Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
util: remove redundant declaration
This module is already required in the top scope (Line 3).
  • Loading branch information
vsemozhetbyt committed Jul 12, 2017
commit 489282f0d33dd732cd2a0cdb8455f0e80936276d
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