Skip to content

Commit 98b2e2f

Browse files
committed
be consistent with the project style
1 parent 56b2fd4 commit 98b2e2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/createStore.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ export default function createStore(reducer, initialState) {
6262

6363
return function unsubscribe() {
6464
var index = listeners.indexOf(listener);
65-
if (index === -1)return;
66-
listeners.splice(index, 1);
65+
if (index !== -1) {
66+
listeners.splice(index, 1);
67+
}
6768
};
6869
}
6970

0 commit comments

Comments
 (0)