From f9e9c9edc508d74bb0055d2dd95b33fa7a43f393 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Tue, 8 Oct 2013 18:55:10 +0200 Subject: [PATCH] Update up to changes in es5-ext --- lib/primitive.js | 6 +++--- lib/regular.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/primitive.js b/lib/primitive.js index 1a0f7b0..3bc6180 100644 --- a/lib/primitive.js +++ b/lib/primitive.js @@ -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); diff --git a/lib/regular.js b/lib/regular.js index 897df56..53c574b 100644 --- a/lib/regular.js +++ b/lib/regular.js @@ -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;