Skip to content

Commit c4cdbda

Browse files
committed
Use Immer for readability
1 parent e53ec3c commit c4cdbda

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/commons/application/reducers/VscodeReducer.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ export const VscodeReducer: Reducer<VscodeState, SourceActionType> = (
1515

1616
const newVscodeReducer = createReducer(defaultVscode, builder => {
1717
builder.addCase(VscodeActions.setVscode, state => {
18-
return {
19-
...state,
20-
...{
21-
// Quirky way to determine if the application is running in VSCode or not
22-
isVscode: window.parent !== parent
23-
}
24-
};
18+
// Quirky way to determine if the application is running in VSCode or not
19+
state.isVscode = window.parent !== parent;
2520
});
2621
});

0 commit comments

Comments
 (0)