Skip to content

Commit

Permalink
Update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Feb 22, 2024
1 parent 1073c58 commit fe2aff7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions globals.json
Original file line number Diff line number Diff line change
Expand Up @@ -1816,8 +1816,6 @@
"MessageChannel": false,
"MessageEvent": false,
"MessagePort": false,
"navigator": false,
"Navigator": false,
"performance": false,
"Performance": false,
"PerformanceEntry": false,
Expand Down Expand Up @@ -2384,8 +2382,6 @@
"MessageChannel": false,
"MessageEvent": false,
"MessagePort": false,
"navigator": false,
"Navigator": false,
"performance": false,
"Performance": false,
"PerformanceEntry": false,
Expand Down
8 changes: 6 additions & 2 deletions scripts/utilities.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ async function updateGlobals({environment, getGlobals, dryRun, incremental}) {
function getGlobalThisProperties() {
const keys = [];

for (let object = globalThis; object; object = Object.getPrototypeOf(object)) {
for (
let object = globalThis;
object && object !== Object.prototype;
object = Object.getPrototypeOf(object)
) {
keys.push(...Object.getOwnPropertyNames(object));
}

return keys;
return keys.filter(key => key !== 'constructor');
}

async function createGlobals(names, {
Expand Down

0 comments on commit fe2aff7

Please sign in to comment.