Prechádzať zdrojové kódy

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

Afshin Darian 6 rokov pred
rodič
commit
4f405f90b1
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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) {