Fix replaceAll

This commit is contained in:
Rafael 2021-12-10 17:03:53 -03:00 committed by Thomas Zarebczan
parent 561ed0ea23
commit 392e7c37a4
4 changed files with 10 additions and 2 deletions

View file

@ -54,6 +54,7 @@
"@silvermine/videojs-chromecast": "^1.3.3", "@silvermine/videojs-chromecast": "^1.3.3",
"@ungap/from-entries": "^0.2.1", "@ungap/from-entries": "^0.2.1",
"auto-launch": "^5.0.5", "auto-launch": "^5.0.5",
"core-js-pure": "^3.19.3",
"electron-dl": "^1.11.0", "electron-dl": "^1.11.0",
"electron-log": "^2.2.12", "electron-log": "^2.2.12",
"electron-notarize": "^1.0.0", "electron-notarize": "^1.0.0",

View file

@ -6,11 +6,12 @@ import { MAX_LIVESTREAM_COMMENTS } from 'constants/livestream';
import { selectChannelMentionData } from 'redux/selectors/comments'; import { selectChannelMentionData } from 'redux/selectors/comments';
import { selectShowMatureContent } from 'redux/selectors/settings'; import { selectShowMatureContent } from 'redux/selectors/settings';
import { withRouter } from 'react-router'; import { withRouter } from 'react-router';
import replaceAll from 'core-js-pure/features/string/replace-all';
import TextareaWithSuggestions from './view'; import TextareaWithSuggestions from './view';
const select = (state, props) => { const select = (state, props) => {
const { pathname } = props.location; const { pathname } = props.location;
const uri = `lbry:/${pathname.replaceAll(':', '#')}`; const uri = `lbry:/${replaceAll(pathname, ':', '#')}`;
const maxComments = props.isLivestream ? MAX_LIVESTREAM_COMMENTS : -1; const maxComments = props.isLivestream ? MAX_LIVESTREAM_COMMENTS : -1;
const data = selectChannelMentionData(state, uri, maxComments); const data = selectChannelMentionData(state, uri, maxComments);

View file

@ -9,6 +9,7 @@ import EMOJIS from 'emoji-dictionary';
import LbcSymbol from 'component/common/lbc-symbol'; import LbcSymbol from 'component/common/lbc-symbol';
import Popper from '@mui/material/Popper'; import Popper from '@mui/material/Popper';
import React from 'react'; import React from 'react';
import replaceAll from 'core-js-pure/features/string/replace-all';
import TextareaSuggestionsItem from 'component/textareaSuggestionsItem'; import TextareaSuggestionsItem from 'component/textareaSuggestionsItem';
import TextField from '@mui/material/TextField'; import TextField from '@mui/material/TextField';
import useLighthouse from 'effects/use-lighthouse'; import useLighthouse from 'effects/use-lighthouse';
@ -159,7 +160,7 @@ export default function TextareaWithSuggestions(props: Props) {
let emoteLabel; let emoteLabel;
if (isEmote) { if (isEmote) {
// $FlowFixMe // $FlowFixMe
emoteLabel = `:${option.replaceAll(':', '')}:`; emoteLabel = `:${replaceAll(option, ':', '')}:`;
} }
return { return {

View file

@ -5174,6 +5174,11 @@ core-js-pure@^3.0.0:
version "3.6.4" version "3.6.4"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.4.tgz#4bf1ba866e25814f149d4e9aaa08c36173506e3a" 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: core-js@^1.0.0:
version "1.2.7" version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"