Browse Source

new version of extend

patch-2
Manuel Araoz 10 years ago
parent
commit
b37a8d2f32
  1. 4
      lib/errors/index.js

4
lib/errors/index.js

@ -25,6 +25,7 @@ var traverseNode = function(parent, errorDefinition) {
if (errorDefinition.errors) { if (errorDefinition.errors) {
childDefinitions(NodeError, errorDefinition.errors); childDefinitions(NodeError, errorDefinition.errors);
} }
return NodeError;
}; };
/* jshint latedef: false */ /* jshint latedef: false */
@ -56,6 +57,5 @@ traverseRoot(bitcore.Error, data);
module.exports = bitcore.Error; module.exports = bitcore.Error;
module.exports.extend = function(spec) { module.exports.extend = function(spec) {
traverseNode(bitcore.Error, spec); return traverseNode(bitcore.Error, spec);
return bitcore.Error;
}; };

Loading…
Cancel
Save