Describe the bug
The prototype lookup never happens when creating an Intl.DateTimeFormat with wrong options.
To Reproduce
This JavaScript code reproduces the issue:
const proxyConstructor = new Proxy(Intl.DateTimeFormat, {
get(target, prop) {
if (prop === "prototype") {
console.log("1. Prototype accessed");
}
return target[prop];
}
});
try {
new proxyConstructor("en", { timeZone: "Invalid/Zone" });
} catch (e) {
console.log("2. Error thrown");
}
Expected behavior
Running this code, we should see this in console
1. Prototype accessed
2. Error thrown
But get this instead
Describe the bug
The prototype lookup never happens when creating an
Intl.DateTimeFormatwith wrong options.To Reproduce
This JavaScript code reproduces the issue:
Expected behavior
Running this code, we should see this in console
But get this instead