update: add default null value to injections
* "disables" warnings about injection not being found * we assume that the injection can be undefined, so we don't need to be spammed about missing injections Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -67,7 +67,7 @@ const bind = (emit: EmitFunc, hooks: FlowHooks) => {
|
||||
}
|
||||
|
||||
export default (store: FlowStore, emit?: EmitFunc) => {
|
||||
let hooks = inject(Hooks)!
|
||||
let hooks = inject(Hooks, null)!
|
||||
if (!hooks) {
|
||||
if (import.meta.env.DEV) console.warn('hooks context not found; creating default hooks')
|
||||
hooks = store.hooks
|
||||
|
||||
Reference in New Issue
Block a user