Skip to content

Commit 6eea3fc

Browse files
fix(overmind): pass overmind instance to namespaced onInitialize
1 parent 33dc5b0 commit 6eea3fc

File tree

1 file changed

+2
-3
lines changed
  • packages/node_modules/overmind/src/config

1 file changed

+2
-3
lines changed

packages/node_modules/overmind/src/config/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ export function namespaced<T extends NamespacedConfiguration>(
201201
},
202202
result.initializers.length
203203
? {
204-
onInitialize: (context) =>
205-
Promise.all(result.initializers.map((cb) => cb(context))),
204+
onInitialize: (context, app) =>
205+
Promise.all(result.initializers.map((cb) => cb(context, app))),
206206
}
207207
: {}
208208
)
@@ -291,7 +291,6 @@ export function lazy<T extends LazyConfiguration, B = T>(
291291
if (newConfig.onInitialize)
292292
newConfig.onInitialize(
293293
{
294-
value: app,
295294
state,
296295
...rest,
297296
},

0 commit comments

Comments
 (0)