Skip to content

Commit

Permalink
fix: do not use else if (#6)
Browse files Browse the repository at this point in the history
If getter and setter are defined, with else if the setter would never be defined.
  • Loading branch information
exreplay authored May 18, 2020
1 parent 1488a22 commit 97b16b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/decorators/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export function assignStates<S>(Obj: any) {
const output = (descriptor.get as Function).call(thisObject);
return output;
};
} else if (descriptor && descriptor.set) {
}
if (descriptor && descriptor.set) {
mutations[func] = (state: S, payload: any) => {
(descriptor.set as Function).call(state, payload);
};
Expand Down

0 comments on commit 97b16b3

Please # to comment.