1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #4302 from node-red/4291-auto-sub-mqtt-error

Remove unnecessary check for clientid if autoUnsub set
This commit is contained in:
Nick O'Leary 2023-09-05 09:43:52 +01:00 committed by GitHub
commit 1bad643b30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -492,12 +492,12 @@
let ok = true; let ok = true;
if ($("#node-config-input-clientid").length) { if ($("#node-config-input-clientid").length) {
// Currently editing the node // Currently editing the node
let needClientId = !$("#node-config-input-cleansession").is(":checked") || !$("#node-config-input-autoUnsubscribe").is(":checked") let needClientId = !$("#node-config-input-cleansession").is(":checked")
if (needClientId) { if (needClientId) {
ok = (v||"").length > 0; ok = (v||"").length > 0;
} }
} else { } else {
let needClientId = !(this.cleansession===undefined || this.cleansession) || this.autoUnsubscribe; let needClientId = !(this.cleansession===undefined || this.cleansession)
if (needClientId) { if (needClientId) {
ok = (v||"").length > 0; ok = (v||"").length > 0;
} }