Skip replacement if there is no replace function on the value. ...
Came across a workflow that was feeding an int 6 in here. Workflow in question at https://civitai.com/models/119528/sdxl-10-comfyui-ultimate-workflow, v3.1.
This commit is contained in:
+1
-1
@@ -182,7 +182,7 @@ app.registerExtension({
|
||||
const callbacks = [
|
||||
() => {
|
||||
let prompt = widget.value;
|
||||
if (replaceRegex) {
|
||||
if (replaceRegex && typeof prompt.replace !== 'undefined') {
|
||||
prompt = prompt.replace(replaceRegex, (match, p1, p2, index, text, groups) => {
|
||||
if (!groups.replace || !groups.id) return match; // No match, bad regex?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user