Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
singleFileList.map((file, i) => {
// Handle raw
if (getExtension(file.name) === 'raw') {
return readRawFile(file, state.rawInfos[i]).then((dataset) =>
readers.push({
name: file.name,
dataset,
})
);
}
return ReaderFactory.loadFiles([file]).then((rs) =>
readers.push(...rs)
);
}),
ReaderFactory.loadFileSeries(
.then((file) => ReaderFactory.loadFiles([file]))
.then((readers) => readers[0])
LOAD_STATE({ dispatch }, stateFile) {
return ReaderFactory.loadFiles([stateFile])
.then((r) => r[0])
.then(({ reader }) =>
reader
.parseAsArrayBuffer()
.then(() =>
dispatch(Actions.RESTORE_APP_STATE, reader.getAppState())
)
);
},
},