Skip to content

Commit 5d58457

Browse files
authored
[Bug] Fix uuid generation in insecure context (#3505)
1 parent 10a96d1 commit 5d58457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/services/workflowService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useSettingStore } from '@/stores/settingStore'
1111
import { useToastStore } from '@/stores/toastStore'
1212
import { ComfyWorkflow, useWorkflowStore } from '@/stores/workflowStore'
1313
import { useWorkspaceStore } from '@/stores/workspaceStore'
14-
import { appendJsonExt } from '@/utils/formatUtil'
14+
import { appendJsonExt, generateUUID } from '@/utils/formatUtil'
1515

1616
import { useDialogService } from './dialogService'
1717

@@ -95,7 +95,7 @@ export const useWorkflowService = () => {
9595
await workflowStore.saveWorkflow(workflow)
9696
} else {
9797
// Generate new id when saving existing workflow as a new file
98-
const id = crypto.randomUUID()
98+
const id = generateUUID()
9999
const state = JSON.parse(
100100
JSON.stringify(workflow.activeState)
101101
) as ComfyWorkflowJSON

0 commit comments

Comments
 (0)