Skip to content

Commit a675c3d

Browse files
vsemozhetbytaddaleax
authored andcommitted
util: remove redundant declaration
This module is already required in the top scope (Line 3). PR-URL: #14199 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Timothy Gu <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 1c0f20f commit a675c3d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/internal/util.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,8 @@ const kCustomPromisifiedSymbol = Symbol('util.promisify.custom');
202202
const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs');
203203

204204
function promisify(orig) {
205-
if (typeof orig !== 'function') {
206-
const errors = require('internal/errors');
205+
if (typeof orig !== 'function')
207206
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
208-
}
209207

210208
if (orig[kCustomPromisifiedSymbol]) {
211209
const fn = orig[kCustomPromisifiedSymbol];

0 commit comments

Comments
 (0)