File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -335,14 +335,10 @@ function promisify(original, options = undefined) {
335335 validateFunction ( original , 'original' ) ;
336336
337337 // No validateObject so .map(util.promisify) can work
338- if ( options == null || typeof options !== 'object' ) {
339- options = ObjectCreate ( null ) ;
340- }
341- const {
342- resolveArray = false ,
343- resolveObject = null ,
344- callbackPosition = null ,
345- } = options ;
338+ const useDefaultOptions = options == null || typeof options !== 'object' ;
339+ const resolveArray = useDefaultOptions ? false : options . allowArray ;
340+ const resolveObject = useDefaultOptions ? null : options . allowFunction ;
341+ const callbackPosition = useDefaultOptions ? null : options . nullable ;
346342
347343 if ( original [ kCustomPromisifiedSymbol ] ) {
348344 const fn = original [ kCustomPromisifiedSymbol ] ;
You can’t perform that action at this time.
0 commit comments