Skip to content

Commit 97c1d19

Browse files
committed
fixed proxy not being returned
1 parent 1fdac6d commit 97c1d19

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/alt/store.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,18 @@ class TestStore {
2626
}
2727

2828
export default function TestStoreWrapper(store, actions) {
29-
return new Proxy(new TestStore(store, actions), {
29+
var proxy = new Proxy(new TestStore(store, actions), {
3030
get: function(target, name) {
3131
if (name in target) {
3232
return target[name]
3333
}
3434
else if (name in target.actions) {
3535
return (params) => {
3636
target.actions[name](params)
37-
return target
37+
return proxy
3838
}
3939
}
4040
}
4141
})
42+
return proxy
4243
}

0 commit comments

Comments
 (0)