Browse Source

Update mnn.js

Lutz Roeder 4 years ago
parent
commit
cb8387b5d9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      source/mnn.js

+ 1 - 1
source/mnn.js

@@ -11,7 +11,7 @@ mnn.ModelFactory = class {
             const extension = context.identifier.split('.').pop().toLowerCase();
             if (extension == 'mnn') {
                 const buffer = stream.peek(4);
-                const reader = new flatbuffers.BinaryReader(buffer);
+                const reader = flatbuffers.BinaryReader.open(buffer);
                 if (reader.root === 0x00000018 || reader.root === 0x0000001C || reader.root === 0x00000020) {
                     return true;
                 }