diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index 74cbe7ca04..3cbc2e04ae 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -118,32 +118,29 @@ export default class BrowserCell extends Component { this.props.value[0].__type === 'Pointer' && typeof this.props.onPointerClick === 'function' ) { - const array = []; - this.props.value.map((v, i) => { - if (typeof v !== 'object' || v.__type !== 'Pointer') { - throw new Error('Invalid type found in pointer array'); + const items = this.props.value.map((v, i) => { + if (!v || typeof v !== 'object' || v.__type !== 'Pointer') { + return
  • {JSON.stringify(v)}
  • ; } const object = new Parse.Object(v.className); object.id = v.objectId; - array.push( - + return ( +
  • + +
  • ); }); - content = ( - - ); - // Set copyableValue to JSON string, not JSX (to avoid infinite render loop) + content = ; this.copyableValue = JSON.stringify(this.props.value); + if (this.props.value.length > 1) { + classes.push(styles.hasMore); + } } else { this.copyableValue = content = JSON.stringify(this.props.value); } diff --git a/src/components/Pill/Pill.react.js b/src/components/Pill/Pill.react.js index 29f194c17c..6caa947bac 100644 --- a/src/components/Pill/Pill.react.js +++ b/src/components/Pill/Pill.react.js @@ -13,6 +13,7 @@ import Icon from 'components/Icon/Icon.react'; const Pill = ({ value, onClick, + onCmdClick, fileDownloadLink, followClick = false, shrinkablePill = false, @@ -29,7 +30,7 @@ const Pill = ({ {value} {followClick && ( - !e.metaKey && onClick()}> + { const handler = e.metaKey ? (onCmdClick || onClick) : onClick; if (typeof handler === 'function') { handler(); } }}> )}