fixed karma

This commit is contained in:
Phil Hughes 2018-03-28 14:08:15 +01:00
parent 029f7e6cd8
commit 6bec91bfc9
No known key found for this signature in database
GPG Key ID: 32245528C52E0F9F
2 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,9 @@ export default {
if (active && !state.entries[path].pending) {
Object.assign(state, {
openFiles: state.openFiles.map(f => Object.assign(f, { active: !(f.pending && f.active) })),
openFiles: state.openFiles.map(f =>
Object.assign(f, { active: f.pending ? false : f.active }),
),
});
}
},

View File

@ -27,6 +27,7 @@ describe('Multi-file store file mutations', () => {
localState.openFiles.push({
...localFile,
pending: true,
active: true,
});
mutations.SET_FILE_ACTIVE(localState, {