Skip to content

Commit 841a651

Browse files
authored
Fix bad warnOnlyOnce minification (#2448)
1 parent 9a7681f commit 841a651

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/lexical-react/src/LexicalPlainTextPlugin.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function PlainTextPlugin({
2929
initialEditorState?: InitialEditorStateType;
3030
placeholder: JSX.Element | string;
3131
}): JSX.Element {
32-
if (initialEditorState !== undefined) {
32+
if (__DEV__ && initialEditorState !== undefined) {
3333
deprecatedInitialEditorStateWarning();
3434
}
3535
const [editor] = useLexicalComposerContext();

packages/lexical-react/src/LexicalRichTextPlugin.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function RichTextPlugin({
2929
initialEditorState?: InitialEditorStateType;
3030
placeholder: JSX.Element | string;
3131
}>): JSX.Element {
32-
if (initialEditorState !== undefined) {
32+
if (__DEV__ && initialEditorState !== undefined) {
3333
deprecatedInitialEditorStateWarning();
3434
}
3535
const [editor] = useLexicalComposerContext();

0 commit comments

Comments
 (0)