Skip to content

Commit 229b5b3

Browse files
authored
chore: move check allow out of forEach (#9086)
1 parent 04ee9ef commit 229b5b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/browser/src/node/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ export class ProjectBrowser implements IProjectBrowser {
106106
if (this.provider.initScripts) {
107107
this.parent.initScripts = this.provider.initScripts
108108
// make sure the script can be imported
109+
const allow = this.parent.vite.config.server.fs.allow
109110
this.provider.initScripts.forEach((script) => {
110-
const allow = this.parent.vite.config.server.fs.allow
111111
if (!allow.includes(script)) {
112112
allow.push(script)
113113
}

0 commit comments

Comments
 (0)