Skip to content

Commit 5986e0a

Browse files
fix(overmind): properly fix serialization of effect args
1 parent d11329e commit 5986e0a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
441441
this.eventHub.emit(EventType.EFFECT, {
442442
...execution,
443443
...effect,
444+
args: safeValues(effect.args),
444445
isPending: false,
445446
error: error.message,
446447
})
@@ -452,6 +453,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
452453
this.eventHub.emit(EventType.EFFECT, {
453454
...execution,
454455
...effect,
456+
args: safeValues(effect.args),
455457
isPending: true,
456458
error: false,
457459
})
@@ -461,6 +463,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
461463
this.eventHub.emit(EventType.EFFECT, {
462464
...execution,
463465
...effect,
466+
args: safeValues(effect.args),
464467
result: safeValue(promisedResult),
465468
isPending: false,
466469
error: false,
@@ -470,6 +473,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
470473
this.eventHub.emit(EventType.EFFECT, {
471474
...execution,
472475
...effect,
476+
args: safeValues(effect.args),
473477
isPending: false,
474478
error: error.message,
475479
})
@@ -479,6 +483,7 @@ export class Overmind<Config extends Configuration> implements Configuration {
479483
this.eventHub.emit(EventType.EFFECT, {
480484
...execution,
481485
...effect,
486+
args: safeValues(effect.args),
482487
result: safeValue(result),
483488
isPending: false,
484489
error: false,

packages/node_modules/overmind/src/proxyfyEffects.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { safeValues } from './Devtools'
2-
31
export const doNotProxy = Symbol('doNotProxy')
42

53
function isObject(value) {
@@ -18,7 +16,7 @@ function wrapEffect(target, prop, path, cb) {
1816
effectId,
1917
name: path,
2018
method: prop,
21-
args: safeValues(args),
19+
args,
2220
})
2321
}
2422

0 commit comments

Comments
 (0)