We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f91c388 commit 9877de0Copy full SHA for 9877de0
docs/advanced/creating-custom-registries.md
@@ -169,8 +169,11 @@ function ConfigRegistry(config){
169
util.inherits(ConfigRegistry, DefaultRegistry);
170
171
ConfigRegistry.prototype.set = function set(name, fn) {
172
+ var bound = fn.bind(this.config);
173
+ // Preserve internal properties and task metadata.
174
+ var task = Object.assign(bound, fn);
175
// The `DefaultRegistry` uses `this._tasks` for storage.
- var task = this._tasks[name] = fn.bind(this.config);
176
+ this._tasks[name] = task;
177
return task;
178
};
179
0 commit comments