Update up to changes in es5-ext

This commit is contained in:
Mariusz Nowak
2013-10-08 18:55:10 +02:00
parent 05949b19e3
commit f9e9c9edc5
2 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
'use strict';
var CustomError = require('es5-ext/error/custom')
var customError = require('es5-ext/error/custom')
, callable = require('es5-ext/object/valid-callable')
, hasListeners = require('event-emitter/lib/has-listeners')
@@ -53,7 +53,7 @@ module.exports = require('./_base')(function (conf, length, options) {
if (arguments.length === 1) value = call.call(fn, this, id);
else value = apply.call(fn, this, arguments);
if (cache.hasOwnProperty(id)) {
throw new CustomError("Circular invocation", 'CIRCULAR_INVOCATION');
throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
}
cache[id] = value;
if (initListeners) conf.emit('init', id);
@@ -66,7 +66,7 @@ module.exports = require('./_base')(function (conf, length, options) {
}
value = apply.call(conf.fn, this, arguments);
if (cache.hasOwnProperty(id)) {
throw new CustomError("Circular invocation", 'CIRCULAR_INVOCATION');
throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
}
cache[id] = value;
if (initListeners) conf.emit('init', id);

View File

@@ -2,7 +2,7 @@
'use strict';
var CustomError = require('es5-ext/error/custom')
var customError = require('es5-ext/error/custom')
, indexOf = require('es5-ext/array/#/e-index-of')
, hasListeners = require('event-emitter/lib/has-listeners')
@@ -222,7 +222,7 @@ module.exports = require('./_base')(function (conf, length) {
value = apply.call(fn, this, arguments);
id = get(arguments);
if (id != null) {
throw new CustomError("Circular invocation", 'CIRCULAR_INVOCATION');
throw customError("Circular invocation", 'CIRCULAR_INVOCATION');
}
id = set(arguments);
cache[id] = value;