From 137a5bc39a4d3cdccddbd8278bd980758d1ce039 Mon Sep 17 00:00:00 2001 From: rolancia Date: Wed, 5 May 2021 04:22:10 +0900 Subject: [PATCH] fix: checking navigator type before to determine isMacOs --- projects/ngx-editor/src/lib/defaultPlugins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/