Quellcode durchsuchen

Remove model factory host dependency

Lutz Roeder vor 5 Jahren
Ursprung
Commit
c1bb56e247
2 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 2 2
      source/index.js
  2. 1 1
      source/view.js

+ 2 - 2
source/index.js

@@ -929,11 +929,11 @@ host.BrowserHost.BrowserFileContext = class {
     }
 
     require(id) {
-        return this._context.require(id);
+        return this._host.require(id);
     }
 
     exception(error, fatal) {
-        this._context.exception(error, fatal);
+        this._host.exception(error, fatal);
     }
 
     open() {

+ 1 - 1
source/view.js

@@ -975,7 +975,7 @@ view.View = class {
                 this.showNodeDocumentation(node);
             });
             nodeSidebar.on('export-tensor', (sender, tensor) => {
-                this._context.require('./numpy').then((numpy) => {
+                this._host.require('./numpy').then((numpy) => {
                     const defaultPath = tensor.name ? tensor.name.split('/').join('_').split(':').join('_').split('.').join('_') : 'tensor';
                     this._host.save('NumPy Array', 'npy', defaultPath, (file) => {
                         try {