Skip to content

Commit be63e57

Browse files
fix(overmind): proxyify effects bug
1 parent a0a4299 commit be63e57

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/node_modules/overmind/src/config/statechart.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ describe('Statecharts', () => {
283283
})).toEqual(true)
284284
})
285285

286-
test.only('should allow nesting', () => {
286+
test('should allow nesting', () => {
287287
const fooEntry: Action = ({ state }) => {
288288
state.transitions.push('fooEntry')
289289
}

packages/node_modules/overmind/src/proxyfyEffects.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export function proxifyEffects<Effects>(
1212
cb: (effect) => void,
1313
path: string = ''
1414
): Effects {
15+
if (!isObject(effects) && !(typeof effects === 'function')) {
16+
return effects
17+
}
18+
1519
return new Proxy(effects as any, {
1620
apply(target, thisArg, agumentsList) {
1721
const effectId = currentEffectId++

0 commit comments

Comments
 (0)