Skip to content

Commit b64f110

Browse files
committed
fixup! minor
1 parent 075854e commit b64f110

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

packages/cloudflare/src/cli/build/open-next/compile-skew-protection.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ export async function compileSkewProtection(options: BuildOptions, config: OpenN
1717

1818
// Create a tree of assets located inside the base path
1919
const assetPath = path.join(options.outputDir, "assets", globalThis.__NEXT_BASE_PATH__ ?? "");
20-
const files = await glob(`**/*`, {
21-
windowsPathsNoEscape: true,
22-
posix: true,
23-
nodir: true,
24-
absolute: false,
25-
cwd: assetPath,
26-
});
20+
const files = skewProtectionEnabled
21+
? await glob(`**/*`, {
22+
windowsPathsNoEscape: true,
23+
posix: true,
24+
nodir: true,
25+
absolute: false,
26+
cwd: assetPath,
27+
})
28+
: [];
2729
// All files located inside `_next/static` are static assets, no need to list them
28-
const assetTree = filesToTree(
29-
skewProtectionEnabled ? files.filter((path) => !path.startsWith("_next/static/")) : []
30-
);
30+
const assetTree = filesToTree(files.filter((path) => !path.startsWith("_next/static/")));
3131

3232
await build({
3333
entryPoints: [initPath],

0 commit comments

Comments
 (0)