mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
fix: regex -> startsWith
This commit is contained in:
1 parent
133cb56cca
commit
f2eb395e8d
1 file changed
+1
-3
@@ -53,9 +53,7 @@ class DocumentEditor extends React.Component<Props> {
|
||||
render() {
|
||||
const { document, title, onChangeTitle, isDraft, readOnly } = this.props;
|
||||
const { emoji } = parseTitle(title);
|
||||
const startsWithEmojiAndSpace = !!(
|
||||
emoji && title.match(new RegExp(`^${emoji}\\s`))
|
||||
);
|
||||
const startsWithEmojiAndSpace = !!(emoji && title.startsWith(`${emoji} `));
|
||||
|
||||
return (
|
||||
<Flex auto column>
|
||||
|
||||
Reference in new issue
Block a user