webcontainer-core
webcontainer-core copied to clipboard
Classes that extend Promise break instanceof
Describe the bug
Promise instances are treated as instances of any class that extends Promise.
Link to the blitz that caused the error
https://stackblitz.com/edit/stackblitz-starters-q5rlbxff?file=index.js
Steps to reproduce
class Xxx extends Promise {}
Promise.resolve() instanceof Xxx // true (but must be false)
Expected behavior
A fresh install of Node.js v20.19.1 produces this result:
Parity with Local
- [x] I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
Browser name = Chrome
Full version = 137.0.0.0
Major version = 137
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
performance.memory = {
"totalJSHeapSize": 65797982,
"usedJSHeapSize": 63431078,
"jsHeapSizeLimit": 4294705152
}
Hash = 96435430
Additional context
No response