hookable 5.1.0 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -9
- package/dist/index.mjs +3 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -128,19 +128,13 @@ class Hookable {
|
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
callHook(name, ...args) {
|
|
131
|
-
|
|
132
|
-
return serialCaller(this._hooks[name], args);
|
|
133
|
-
}
|
|
131
|
+
return serialCaller(this._hooks[name] || [], args);
|
|
134
132
|
}
|
|
135
133
|
callHookParallel(name, ...args) {
|
|
136
|
-
|
|
137
|
-
return parallelCaller(this._hooks[name], args);
|
|
138
|
-
}
|
|
134
|
+
return parallelCaller(this._hooks[name] || [], args);
|
|
139
135
|
}
|
|
140
136
|
callHookWith(caller, name, ...args) {
|
|
141
|
-
|
|
142
|
-
return caller(this._hooks[name], args);
|
|
143
|
-
}
|
|
137
|
+
return caller(this._hooks[name] || [], args);
|
|
144
138
|
}
|
|
145
139
|
}
|
|
146
140
|
function createHooks() {
|
package/dist/index.mjs
CHANGED
|
@@ -124,19 +124,13 @@ class Hookable {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
callHook(name, ...args) {
|
|
127
|
-
|
|
128
|
-
return serialCaller(this._hooks[name], args);
|
|
129
|
-
}
|
|
127
|
+
return serialCaller(this._hooks[name] || [], args);
|
|
130
128
|
}
|
|
131
129
|
callHookParallel(name, ...args) {
|
|
132
|
-
|
|
133
|
-
return parallelCaller(this._hooks[name], args);
|
|
134
|
-
}
|
|
130
|
+
return parallelCaller(this._hooks[name] || [], args);
|
|
135
131
|
}
|
|
136
132
|
callHookWith(caller, name, ...args) {
|
|
137
|
-
|
|
138
|
-
return caller(this._hooks[name], args);
|
|
139
|
-
}
|
|
133
|
+
return caller(this._hooks[name] || [], args);
|
|
140
134
|
}
|
|
141
135
|
}
|
|
142
136
|
function createHooks() {
|