diff --git a/examples/Viewer.tsx b/examples/Viewer.tsx index 7ffcb3c7..8c9fd511 100644 --- a/examples/Viewer.tsx +++ b/examples/Viewer.tsx @@ -271,8 +271,8 @@ class Viewer extends React.Component { const geoAssets = filesArr.reduce((acc, cur, index) => { if (index !== simulariumFileIndex) { acc[cur.name] = parsedFiles[index]; - return acc; } + return acc; }, {}); const fileName = filesArr[simulariumFileIndex].name; this.loadFile(simulariumFile, fileName, geoAssets); diff --git a/src/controller/index.ts b/src/controller/index.ts index cf940ba3..9d0fbe11 100644 --- a/src/controller/index.ts +++ b/src/controller/index.ts @@ -334,7 +334,7 @@ export default class SimulariumController { throw new Error("File must be a .simularium file"); } - if (geoAssets && geoAssets.length) { + if (geoAssets) { return this.changeFile({ simulariumFile, geoAssets }, fileName); } else { return this.changeFile({ simulariumFile }, fileName);