Skip to content

Commit edb50d8

Browse files
authored
Merge pull request #260 from aladdin-add/issue259
fix: global is not defined (fixes #259)
2 parents 3abaf90 + a4487a4 commit edb50d8

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)