-
Notifications
You must be signed in to change notification settings - Fork 856
Object Prototypes Incorrect #91
New issue
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
Comments
Hey! 👋 This is an issue with how Miniflare (the local Workers simulator that powers As mentioned there, we could add an option that lets you choose which behaviour you want:
|
mrbbot
added a commit
to cloudflare/miniflare
that referenced
this issue
Jan 3, 2022
This was initially added to make it easier to run Rust workers in Miniflare, as `wasm-bindgen` frequently generates this code. However, the implementation caused `Object` prototype/constructor checks to fail in JavaScript. The previous behaviour can be restored with the `--proxy-primitive`/`miniflare.proxy_primitive_instanceof`/ `proxyPrimitiveInstanceOf` CLI/`wrangler.toml`/API option. Closes #109 Closes #137 Closes #141 Closes cloudflare/workers-sdk#91
This was referenced Jan 3, 2022
mrbbot
added a commit
to cloudflare/miniflare
that referenced
this issue
Jan 7, 2022
This was initially added to make it easier to run Rust workers in Miniflare, as `wasm-bindgen` frequently generates this code. However, the implementation caused `Object` prototype/constructor checks to fail in JavaScript. The previous behaviour can be restored with the `--proxy-primitive`/`miniflare.proxy_primitive_instanceof`/ `proxyPrimitiveInstanceOf` CLI/`wrangler.toml`/API option. Closes #109 Closes #137 Closes #141 Closes cloudflare/workers-sdk#91
petebacondarwin
pushed a commit
to petebacondarwin/wrangler2
that referenced
this issue
Dec 17, 2024
* Update tsconfig files * Renamed worker directories * Update tsconfig files in playground and ensure all files are being type checked * Removed type generation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm running into an issue where I believe default prototype for objects is incorrect.
That is,
Object.getPrototypeOf({})
is notObject.prototype
.Based on the spec, I'm not entirely sure that this should be the case;
but running this code:
returns:
true
in the browser and on cloudflareworkers.comfalse
when runningwrangler pages dev
The text was updated successfully, but these errors were encountered: