mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 03:30:04 +00:00
Add error boundary on node.DrawBackground (#311)
This commit is contained in:
@@ -657,7 +657,7 @@ export class ComfyApp {
|
||||
}
|
||||
}
|
||||
|
||||
node.prototype.onDrawBackground = function (ctx) {
|
||||
function unsafeDrawBackground(ctx) {
|
||||
if (!this.flags.collapsed) {
|
||||
let imgURLs = []
|
||||
let imagesChanged = false
|
||||
@@ -992,6 +992,14 @@ export class ComfyApp {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
node.prototype.onDrawBackground = function (ctx) {
|
||||
try {
|
||||
unsafeDrawBackground.call(this, ctx)
|
||||
} catch (error) {
|
||||
console.error('Error drawing node background', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user