From 489282f0d33dd732cd2a0cdb8455f0e80936276d Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Wed, 12 Jul 2017 21:11:32 +0300 Subject: [PATCH] util: remove redundant declaration This module is already required in the top scope (Line 3). --- lib/internal/util.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/internal/util.js b/lib/internal/util.js index 543ebbaf6d6fa6..1eacb95f2ce902 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];