Browse Source

Handle situation where `document` is set to `null` by an environment.

Afshin Darian 6 years ago
parent
commit
4f405f90b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/coreutils/src/pageconfig.ts

+ 1 - 1
packages/coreutils/src/pageconfig.ts

@@ -55,7 +55,7 @@ export namespace PageConfig {
     let found = false;
 
     // Use script tag if available.
-    if (typeof document !== 'undefined') {
+    if (typeof document !== 'undefined' && document) {
       const el = document.getElementById('jupyter-config-data');
 
       if (el) {