Skip to content

Commit 32bbeff

Browse files
committed
format
1 parent b50cdf1 commit 32bbeff

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

packages/scramjet/packages/core/src/client/shared/wrap.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ export function createWrapFn(client: ScramjetClient, self: typeof globalThis) {
1616
// ... then we should pretend we aren't nested and return the current window
1717
wrappedParent = self;
1818
}
19-
} catch {
20-
// accessing self.parent can throw if it's cross-origin, in which case we should also pretend we aren't nested
21-
wrappedParent = self;
19+
} catch {
20+
// accessing self.parent can throw if it's cross-origin, in which case we should also pretend we aren't nested
21+
wrappedParent = self;
2222
}
2323
// instead of returning top, we need to return the uppermost parent that's inside a scramjet context
2424
let current = self;
2525
for (;;) {
2626
const test = current.parent.self;
2727
if (test === current) break; // there is no parent, actual or emulated.
28-
28+
2929
try {
3030
// ... then `test` represents a window outside of the proxy context, and therefore `current` is the topmost window in the proxy context
3131
if (!(SCRAMJETCLIENT in test)) break;
@@ -38,15 +38,14 @@ export function createWrapFn(client: ScramjetClient, self: typeof globalThis) {
3838
}
3939
wrappedTop = current;
4040
}
41-
41+
4242
return function (identifier: any, strict: boolean) {
4343
if (identifier === self.location) return client.locationProxy;
4444
if (identifier === self.eval) return indirectEval.bind(client, strict);
4545
if (iswindow) {
4646
if (identifier === self.parent) {
4747
return wrappedParent;
48-
}
49-
else if (identifier === self.top) {
48+
} else if (identifier === self.top) {
5049
return wrappedTop;
5150
}
5251
}

packages/scramjet/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"noEmit": true,
66
"allowImportingTsExtensions": true,
77
"lib": ["ES2022", "dom", "dom.iterable"],
8-
"target": "ES2022",
8+
"target": "ES2022"
99
},
10-
"include": ["devserver.ts", "devlib.ts"],
11-
}
10+
"include": ["devserver.ts", "devlib.ts"]
11+
}

0 commit comments

Comments
 (0)