Merge pull request #689 from elie222/patch-1

Spelling fix
This commit is contained in:
Ilya Kantor 2018-12-26 12:08:24 +03:00 committed by GitHub
commit e62dfd5254
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -220,7 +220,7 @@ alert(obj.__proto__); // [object Object], didn't work as intended
As we see from the code, the assignment to a primitive `5` is ignored.
That can become a source of bugs and even vulnerabilies if we intend to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys.
That can become a source of bugs and even vulnerabilities if we intend to store arbitrary key-value pairs in an object, and allow a visitor to specify the keys.
In that case the visitor may choose "__proto__" as the key, and the assignment logic will be ruined (as shown above).