Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cancel: Mutations.FILE_IDLE,
closeAndTryToLoad(commit) {
const allFilesErrored = this.files.reduce(
(flag, { error }) => flag && error,
true
);
if (!allFilesErrored) {
commit(Mutations.SHOW_APP);
}
commit(Mutations.FILE_IDLE);
},
}),
mapActions({
openFiles: Actions.OPEN_FILES,
}),
{
isRawFile: (f) => f.name.toLowerCase().endsWith('.raw'),
}
),
};
.then((files) => {
commit(Mutations.FILE_SET_URLS, []);
return dispatch(Actions.OPEN_FILES, files);
})
.catch((errors) => onLoadErrored(commit, errors));
ReaderFactory.openFiles(exts, (files) =>
dispatch(Actions.OPEN_FILES, Array.from(files))
);
openFiles: (dispatch, files) =>
dispatch(Actions.OPEN_FILES, Array.from(files)),