Browse Source

proteopedia wrapper bugfix

David Sehnal 5 years ago
parent
commit
f912b2d802
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/examples/proteopedia-wrapper/index.ts

+ 1 - 1
src/examples/proteopedia-wrapper/index.ts

@@ -434,7 +434,7 @@ class MolStarProteopediaWrapper {
             try {
                 const snapshot = await this.plugin.runTask(this.plugin.fetch({ url, type: 'json' }));
                 // TODO: is this OK to test for snapshots from server?
-                await this.plugin.state.setSnapshot(snapshot?.data?.entries[0]?.snapshot || snapshot);
+                await this.plugin.state.setSnapshot(snapshot?.data?.entries?.[0]?.snapshot || snapshot);
             } catch (e) {
                 console.log(e);
             }