We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this
window
0.6.10
macos
Try use source-map library in a bundle.
source-map
isBrowserEnvironment check fails.
isBrowserEnvironment
Transpiled code:
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); ... var require_read_wasm = __commonJS((exports, module) => { var __dirname = "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/source-map@0.7.4/node_modules/source-map/lib"; var isBrowserEnvironment = function() { return typeof window !== "undefined" && this === window; }.call(); if (isBrowserEnvironment) {
this === window fails...this is undefined.
this === window
this should be window.
It's undefined.
The use of () => {} instead of function probably causes this as it removes the this binding.
() => {}
function
The text was updated successfully, but these errors were encountered:
Nevermind, was an issue in original package.
mozilla/source-map#459
Sorry, something went wrong.
No branches or pull requests
What version of Bun is running?
0.6.10
What platform is your computer?
macos
What steps can reproduce the bug?
Try use
source-map
library in a bundle.isBrowserEnvironment
check fails.Transpiled code:
this === window
fails...this
is undefined.What is the expected behavior?
this
should bewindow
.What do you see instead?
It's undefined.
Additional information
The use of
() => {}
instead offunction
probably causes this as it removes thethis
binding.The text was updated successfully, but these errors were encountered: