Skip to content

Commit ca68fd8

Browse files
[fix] Remove dynamic import race condition in file handling
Replace dynamic import with static import in handleFile method to eliminate race condition causing Playwright test flakiness. The dynamic import introduced asynchronous behavior that created timing issues in tests expecting immediate file processing completion. Fixes #3955 test flakiness
1 parent aca1a2a commit ca68fd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import type { ComfyExtension, MissingNodeType } from '@/types/comfy'
5252
import { ExtensionManager } from '@/types/extensionTypes'
5353
import { ColorAdjustOptions, adjustColor } from '@/utils/colorUtil'
5454
import { graphToPrompt } from '@/utils/executionUtil'
55+
import { getFileHandler } from '@/utils/fileHandlers'
5556
import {
5657
executeWidgetsCallback,
5758
fixLinkInputSlots,
@@ -1262,7 +1263,6 @@ export class ComfyApp {
12621263
* @param {File} file
12631264
*/
12641265
async handleFile(file: File) {
1265-
const { getFileHandler } = await import('@/utils/fileHandlers')
12661266
const removeExt = (f: string) => {
12671267
if (!f) return f
12681268
const p = f.lastIndexOf('.')

0 commit comments

Comments
 (0)