Skip to content

Commit

Permalink
fix: check navigator type for SSR (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolancia authored May 5, 2021
1 parent fdbcb49 commit 2a58a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngx-editor/src/lib/defaultPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/

Expand Down

0 comments on commit 2a58a3a

Please sign in to comment.