diff --git a/packages/node_modules/@node-red/nodes/core/common/21-debug.html b/packages/node_modules/@node-red/nodes/core/common/21-debug.html index 20772c0de..b1ff33baf 100644 --- a/packages/node_modules/@node-red/nodes/core/common/21-debug.html +++ b/packages/node_modules/@node-red/nodes/core/common/21-debug.html @@ -318,6 +318,12 @@ delete RED._debug; }, oneditprepare: function() { + $("#node-input-typed-status").typedInput({ + default: "msg", + types:['msg',"jsonata"], + typeField: $("#node-input-statusType") + }); + var that = this; var none = { value: "none", label: RED._("node-red:debug.none"), @@ -327,6 +333,14 @@ this.tosidebar = true; $("#node-input-tosidebar").prop('checked', true); } + if (this.statusVal === undefined) { + this.statusVal = (this.complete === "false") ? "payload" : ((this.complete === "true") ? "payload" : this.complete+""); + $("#node-input-typed-status").typedInput('value',this.statusVal || ""); + } + if (this.statusType === undefined) { + this.statusType = this.targetType; + $("#node-input-typed-status").typedInput('type',this.statusType || "msg"); + } if (typeof this.console === "string") { this.console = (this.console == 'true'); $("#node-input-console").prop('checked', this.console); @@ -363,12 +377,7 @@ } }); - $("#node-input-typed-status").typedInput({ - default: "msg", - types:['msg',"jsonata"], - typeField: $("#node-input-statusType") - }); - var that = this; + $("#node-input-tostatus").on('change',function() { if ($(this).is(":checked")) { if (!that.hasOwnProperty("statusVal") || that.statusVal === "") {