Commit ad98cf04 authored by Antoine du Hamel's avatar Antoine du Hamel Committed by Node.js GitHub Bot
Browse files

stream: remove isPromise utility function

The function was not checking if the parameter was actually a Promise
instance, but if it has a `then` method. Removing the utility function
in favor of a clearer `typeof` check, handling the case when the
thenable throws if then method is accessed more than once.

PR-URL: https://github.com/nodejs/node/pull/35925


Reviewed-By: default avatarRobert Nagy <ronagy@icloud.com>
Reviewed-By: default avatarBenjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
parent adae8220
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment