diff --git a/projects/ngx-editor/src/lib/defaultPlugins.ts b/projects/ngx-editor/src/lib/defaultPlugins.ts index 3d628833..6859166c 100644 --- a/projects/ngx-editor/src/lib/defaultPlugins.ts +++ b/projects/ngx-editor/src/lib/defaultPlugins.ts @@ -19,7 +19,7 @@ interface ShortcutOptions { history: boolean; } -const isMacOs = /Mac/.test(navigator.platform); +const isMacOs = typeof navigator !== 'undefined' ? /Mac/.test(navigator.platform) : false // Input rules ref: https://github.com/ProseMirror/prosemirror-example-setup/