diff --git a/app/soapbox/actions/compose.js b/app/soapbox/actions/compose.js index ff8f765f0..28442f994 100644 --- a/app/soapbox/actions/compose.js +++ b/app/soapbox/actions/compose.js @@ -457,7 +457,9 @@ function insertIntoTagHistory(recognizedTags, text) { const state = getState(); const oldHistory = state.getIn(['compose', 'tagHistory']); const me = state.get('me'); - const names = recognizedTags.map(tag => text.match(new RegExp(`#${tag.name}`, 'i'))[0].slice(1)); + const names = recognizedTags + .filter(tag => text.match(new RegExp(`#${tag.name}`, 'i'))) + .map(tag => tag.name); const intersectedOldHistory = oldHistory.filter(name => names.findIndex(newName => newName.toLowerCase() === name.toLowerCase()) === -1); names.push(...intersectedOldHistory.toJS()); diff --git a/app/soapbox/features/compose/components/upload.js b/app/soapbox/features/compose/components/upload.js index fcfc5e0db..d640823ff 100644 --- a/app/soapbox/features/compose/components/upload.js +++ b/app/soapbox/features/compose/components/upload.js @@ -27,7 +27,7 @@ class Upload extends ImmutablePureComponent { onDescriptionChange: PropTypes.func.isRequired, onOpenFocalPoint: PropTypes.func.isRequired, onSubmit: PropTypes.func.isRequired, - features: PropTypes.map, + features: PropTypes.object, }; state = {