mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-01-08 01:36:33 +08:00
Merge branch 'main' of https://github.com/kijai/ComfyUI-KJNodes
This commit is contained in:
commit
649ecb9c0c
@ -25,7 +25,15 @@ function setColorAndBgColor(type) {
|
||||
// Handle the default case if needed
|
||||
}
|
||||
}
|
||||
let isAlertShown = false;
|
||||
|
||||
function showAlertWithThrottle(message, delay) {
|
||||
if (!isAlertShown) {
|
||||
isAlertShown = true;
|
||||
alert(message);
|
||||
setTimeout(() => isAlertShown = false, delay);
|
||||
}
|
||||
}
|
||||
app.registerExtension({
|
||||
name: "SetNode",
|
||||
registerCustomNodes() {
|
||||
@ -322,7 +330,7 @@ app.registerExtension({
|
||||
return link;
|
||||
} else {
|
||||
const errorMessage = "No SetNode found for " + this.widgets[0].value + "(" + this.type + ")";
|
||||
console.log(errorMessage);
|
||||
showAlertWithThrottle(errorMessage, 5000);
|
||||
throw new Error(errorMessage);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user