Skip to content

Commit e6fe433

Browse files
fix(overmind): fix iteration of sub actions, verify function
1 parent bf77639 commit e6fe433

File tree

1 file changed

+8
-3
lines changed
  • packages/node_modules/overmind/src

1 file changed

+8
-3
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,14 @@ export class Overmind<Config extends Configuration> implements BaseApp {
350350
return Object.assign(aggr, {
351351
[name]: Object.keys(actions[name] || {}).reduce(
352352
(aggr, subName) =>
353-
Object.assign(aggr, {
354-
[subName]: actions[name][subName](operators),
355-
}),
353+
Object.assign(
354+
aggr,
355+
typeof actions[name][subName] === 'function'
356+
? {
357+
[subName]: actions[name][subName](operators),
358+
}
359+
: {}
360+
),
356361
{}
357362
),
358363
})

0 commit comments

Comments
 (0)