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

Commit

Permalink
Call Reflect.preventExtensions() in preventExtensions namespace trap.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jan 27, 2019
1 parent f32bdac commit 494c504
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,9 @@ function assignCommonNamespaceHandlerTraps(handler, entry, proxy) {
Reflect.has(namespace, name)
}

handler.preventExtensions = () => {
return entry._namespaceFinalized === NAMESPACE_FINALIZATION_COMPLETED
handler.preventExtensions = (namespace) => {
return entry._namespaceFinalized === NAMESPACE_FINALIZATION_COMPLETED &&
Reflect.preventExtensions(namespace)
}
}

Expand Down

0 comments on commit 494c504

Please sign in to comment.