diff --git a/package.json b/package.json index b441c5e47..c8c49d629 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "@silvermine/videojs-chromecast": "^1.3.3", "@ungap/from-entries": "^0.2.1", "auto-launch": "^5.0.5", + "core-js-pure": "^3.19.3", "electron-dl": "^1.11.0", "electron-log": "^2.2.12", "electron-notarize": "^1.0.0", diff --git a/ui/component/textareaWithSuggestions/index.js b/ui/component/textareaWithSuggestions/index.js index 576b54cd9..0b9dbcd95 100644 --- a/ui/component/textareaWithSuggestions/index.js +++ b/ui/component/textareaWithSuggestions/index.js @@ -6,11 +6,12 @@ import { MAX_LIVESTREAM_COMMENTS } from 'constants/livestream'; import { selectChannelMentionData } from 'redux/selectors/comments'; import { selectShowMatureContent } from 'redux/selectors/settings'; import { withRouter } from 'react-router'; +import replaceAll from 'core-js-pure/features/string/replace-all'; import TextareaWithSuggestions from './view'; const select = (state, props) => { const { pathname } = props.location; - const uri = `lbry:/${pathname.replaceAll(':', '#')}`; + const uri = `lbry:/${replaceAll(pathname, ':', '#')}`; const maxComments = props.isLivestream ? MAX_LIVESTREAM_COMMENTS : -1; const data = selectChannelMentionData(state, uri, maxComments); diff --git a/ui/component/textareaWithSuggestions/view.jsx b/ui/component/textareaWithSuggestions/view.jsx index e2e88feed..4419593ae 100644 --- a/ui/component/textareaWithSuggestions/view.jsx +++ b/ui/component/textareaWithSuggestions/view.jsx @@ -9,6 +9,7 @@ import EMOJIS from 'emoji-dictionary'; import LbcSymbol from 'component/common/lbc-symbol'; import Popper from '@mui/material/Popper'; import React from 'react'; +import replaceAll from 'core-js-pure/features/string/replace-all'; import TextareaSuggestionsItem from 'component/textareaSuggestionsItem'; import TextField from '@mui/material/TextField'; import useLighthouse from 'effects/use-lighthouse'; @@ -159,7 +160,7 @@ export default function TextareaWithSuggestions(props: Props) { let emoteLabel; if (isEmote) { // $FlowFixMe - emoteLabel = `:${option.replaceAll(':', '')}:`; + emoteLabel = `:${replaceAll(option, ':', '')}:`; } return { diff --git a/yarn.lock b/yarn.lock index fccfa53c8..3f1e335ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5174,6 +5174,11 @@ core-js-pure@^3.0.0: version "3.6.4" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.4.tgz#4bf1ba866e25814f149d4e9aaa08c36173506e3a" +core-js-pure@^3.19.3: + version "3.19.3" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.19.3.tgz#c69b2b36b58927317824994b532ec3f0f7e49607" + integrity sha512-N3JruInmCyt7EJj5mAq3csCgGYgiSqu7p7TQp2KOztr180/OAIxyIvL1FCjzgmQk/t3Yniua50Fsak7FShI9lA== + core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"