summaryrefslogtreecommitdiff
path: root/lib/internal/util.js
diff options
context:
space:
mode:
authorVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-07-12 21:11:32 +0300
committerVse Mozhet Byt <vsemozhetbyt@gmail.com>2017-07-15 01:12:30 +0300
commit2288e3f21cf9dc1bc01d4f544c2c339ff517f839 (patch)
tree70a45ba717c1afc00cfdabae708d1c84090ecf8d /lib/internal/util.js
parente8b8d940d503a3c51abdda216a34010f7a42410a (diff)
downloadandroid-node-v8-2288e3f21cf9dc1bc01d4f544c2c339ff517f839.tar.gz
android-node-v8-2288e3f21cf9dc1bc01d4f544c2c339ff517f839.tar.bz2
android-node-v8-2288e3f21cf9dc1bc01d4f544c2c339ff517f839.zip
util: remove redundant declaration
This module is already required in the top scope (Line 3). PR-URL: https://github.com/nodejs/node/pull/14199 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/internal/util.js')
-rw-r--r--lib/internal/util.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/internal/util.js b/lib/internal/util.js
index 543ebbaf6d..1eacb95f2c 100644
--- a/lib/internal/util.js
+++ b/lib/internal/util.js
@@ -202,10 +202,8 @@ const kCustomPromisifiedSymbol = Symbol('util.promisify.custom');
const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs');
function promisify(orig) {
- if (typeof orig !== 'function') {
- const errors = require('internal/errors');
+ if (typeof orig !== 'function')
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
- }
if (orig[kCustomPromisifiedSymbol]) {
const fn = orig[kCustomPromisifiedSymbol];