Skip to content

Commit

Permalink
Fix geosolutions-it#2610: changed the way of accessing lodash functio…
Browse files Browse the repository at this point in the history
…n in truncateDescription function
  • Loading branch information
Mloweedgar committed Apr 25, 2018
1 parent fd96cfe commit fd75354
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions web/client/components/catalog/RecordItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const PropTypes = require('prop-types');
const SharingLinks = require('./SharingLinks');
const Message = require('../I18N/Message');
const {Image, Panel, Button, Glyphicon} = require('react-bootstrap');
const {isObject} = require('lodash');
const {isObject, truncate} = require('lodash');

const CoordinatesUtils = require('../../utils/CoordinatesUtils');
const ConfigUtils = require('../../utils/ConfigUtils');
Expand Down Expand Up @@ -135,8 +135,6 @@ class RecordItem extends React.Component {
}
};



render() {
let record = this.props.record;
return (
Expand All @@ -153,7 +151,7 @@ class RecordItem extends React.Component {
}

truncateDescription =(description, size) => {
return _.truncate(description, {'length': size, 'separator': /,? +/});
return truncate(description, {'length': size, 'separator': /,? +/});
}

isLinkCopied = (key) => {
Expand Down

0 comments on commit fd75354

Please sign in to comment.