Skip to content

Commit a4487a4

Browse files
committed
fix: global is not defined (fixes #259)
1 parent 3d49010 commit a4487a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as codemirror from 'codemirror';
44
declare let global: any;
55
declare let require: any;
66

7-
const SERVER_RENDERED = (typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true);
7+
const SERVER_RENDERED = (typeof navigator === 'undefined' || (typeof global !== 'undefined' && global['PREVENT_CODEMIRROR_RENDER'] === true));
88

99
let cm;
1010
if (!SERVER_RENDERED) {

0 commit comments

Comments
 (0)