Skip to content

Commit 09511a9

Browse files
feat(overmind): pass namespace path on execution context
1 parent 21dd5f0 commit 09511a9

File tree

1 file changed

+6
-0
lines changed
  • packages/node_modules/overmind/src

1 file changed

+6
-0
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,15 @@ export class Overmind<ThisConfig extends IConfiguration>
396396
return proxyStateTree
397397
}
398398
private createExecution(name, action, parentExecution) {
399+
const namespacePath = name.split('.')
400+
401+
namespacePath.pop()
402+
399403
if (process.env.NODE_ENV === 'production') {
400404
return ({
401405
[EXECUTION]: true,
402406
parentExecution,
407+
namespacePath,
403408
getMutationTree: () => {
404409
return this.proxyStateTree.getMutationTree()
405410
},
@@ -413,6 +418,7 @@ export class Overmind<ThisConfig extends IConfiguration>
413418
const mutationTrees: any[] = []
414419
const execution = {
415420
[EXECUTION]: true,
421+
namespacePath,
416422
actionId: this.actionReferences.indexOf(action),
417423
executionId: this.nextExecutionId++,
418424
actionName: name,

0 commit comments

Comments
 (0)