Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Inconsistency with native behavior #1

Open
ghost opened this issue Jan 25, 2023 · 0 comments
Open

Inconsistency with native behavior #1

ghost opened this issue Jan 25, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 25, 2023

import "./polyfill.mjs"

let x = JSON.parse(`{
   "__proto__" : null
}`)

let y = JSON.parse(`{
   "__proto__" : null
}`, (key, value, context) => value)

console.assert(
    Object.getOwnPropertyNames(x).length == Object.getOwnPropertyNames(y).length
)

Expected: Assertion ok
Actually: Assertion failed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants