Skip to content

Commit

Permalink
util: remove redundant declaration
Browse files Browse the repository at this point in the history
This module is already required in the top scope (Line 3).

PR-URL: #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>
  • Loading branch information
vsemozhetbyt authored and addaleax committed Jul 18, 2017
1 parent 1c0f20f commit a675c3d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/internal/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit a675c3d

Please sign in to comment.