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

Commit

Permalink
Simplify loop in proxyExports().
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Feb 15, 2019
1 parent a1dd74e commit 8032dbd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/util/proxy-exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,7 @@ function init() {
const names = builtin ? null : keys(exported)

for (const name of names) {
const descriptor = Reflect.getOwnPropertyDescriptor(exported, name)

if (descriptor !== void 0 &&
typeof descriptor.get === "function") {
if (typeof Reflect.getOwnPropertyDescriptor(exported, name).get === "function") {
handler.get = get
break
}
Expand Down

0 comments on commit 8032dbd

Please sign in to comment.