File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import useEditorOptions from "../hooks/useEditorOptions";
1010import useEditorInitialization from "../hooks/useEditorInitialization" ;
1111import useEventHandlers from "../hooks/useEventHandlers" ;
1212
13- window . __mailui_newEditorId = window . __mailui_newEditorId || 0 ;
13+ // window.__mailui_newEditorId = window.__mailui_newEditorId || 0;
1414
1515const MailUiEditor = React . forwardRef < MailUiEditorRef , MailUiEditorProps > (
1616 ( props , ref ) => {
Original file line number Diff line number Diff line change 11import { MailUiEditorProps } from "../MailUiEditor" ;
22import { useMemo } from "react" ;
33
4+ const clientWindow = typeof window === 'undefined' ? { __mailui_newEditorId : 0 } : window
5+ clientWindow . __mailui_newEditorId = clientWindow . __mailui_newEditorId || 0 ;
6+
47const useEditorId = ( props : MailUiEditorProps ) => {
58 return useMemo ( ( ) => {
69 return props . editorId || `editor-${ ++ window . __mailui_newEditorId } `
You can’t perform that action at this time.
0 commit comments