fixed bug on replace popup

This commit is contained in:
Nuked
2024-06-06 22:02:43 +02:00
parent 9d5350cd06
commit f2b22b7935
2 changed files with 3 additions and 3 deletions
@@ -381,11 +381,11 @@ var custom_workflows = (function () {
async function handleDocumentDropEvent(event) {
//prevent default action
event.preventDefault();
const sb_workflow_replace = JSON.parse(await getConfiguration('sb_workflow_replace', true)) || true;
const sb_workflow_replace = localStorage.getItem('sb_workflow_replace') || "true";
if (draggedElement.id === 'sidebarWorkflowItem' && event.target.id === 'graph-canvas') {
if (draggedElement.dataset.data === 'NaN') { return; }
if (sb_workflow_replace) {
if (sb_workflow_replace=="true") {
const confirmation = confirm("This will replace the current workflow. Are you sure?");
if (!confirmation) { return; }
}
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-n-sidebar"
description = "A simple sidebar for ComfyUI."
version = "1.2.0"
version = "1.2.1"
license = "LICENSE"
[project.urls]