Typo on context check
msssk opened this issue · comments
Mangala Khalsa commented
Lines 61-62 in store.js don't seem to make sense:
if (!store)
this.store.context = id ? createNamedContext(id) : ProviderContext
Should 61 be changed?
if (!store.context)
— commented
looks good to me, if no external store is passed a context is created either by id or the default.
Stephan Meijer commented
Looks good indeed; The issue just needs a little more context.
store
can still be undefined
here, but this.store
has been initialized one line before the if
. Because there was no store
provided to the contructor, the next thing to do is, assign this store a new context
. Its like @drcmda writes, either done with createNamedContext
or ProviderContext
depending on the given arguments (id
).