Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
closeAndTryToLoad(commit) {
const allFilesErrored = this.files.reduce(
(flag, { error }) => flag && error,
true
);
if (!allFilesErrored) {
commit(Mutations.SHOW_APP);
}
commit(Mutations.FILE_IDLE);
},
}),
function onLoadOkay(commit) {
commit(Mutations.FILE_IDLE);
commit(Mutations.SHOW_APP);
}
}
return true;
},
}),
mapGetters({
totalProgress: Getters.FILE_TOTAL_PROGRESS,
preloadCanLoad: Getters.FILE_RAW_FILES_LOADABLE,
indeterminateProgress: Getters.FILE_INDETERMINATE_PROGRESS,
})
),
methods: Object.assign(
mapMutations({
setFileRawInfo: (commit, fileIndex, rawInfo) =>
commit(Mutations.FILE_SET_RAW_INFO, { fileIndex, rawInfo }),
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,
}),
{