Browse Source

Merge pull request #1785 from blink1073/fix-cell-tools

Check for source before connecting signal
Afshin Darian 8 years ago
parent
commit
68033593c3
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/common/observablejson.ts

+ 3 - 1
src/common/observablejson.ts

@@ -219,7 +219,9 @@ class ObservableJSONWidget extends Widget {
     }
     this._source = value;
     this.editor.readOnly = !value;
-    value.changed.connect(this._onSourceChanged, this);
+    if (value) {
+      value.changed.connect(this._onSourceChanged, this);
+    }
     this._setValue();
   }