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

Raise error on duplicate definition of __proto__ #183

Merged
merged 1 commit into from
Oct 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/parser/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pp.checkPropClash = function (prop, propHash) {
return;
}

if (name === "__proto__" && prop.kind === "init") {
if (name === "__proto__" && !prop.kind) {
if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
propHash.proto = true;
}
Expand Down