Fix incorrect handling of 0 ids

Fix tests of slave and instance ids that incorrectly return the wrong
result when the id is 0.
This commit is contained in:
Hornwitser committed 2023-02-15 20:31:02 +01:00
1 parent 5ad89f072f
commit 3d186a24ff
3 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -289,7 +289,7 @@ class ControlConnection extends BaseConnection {
async updateInstanceConfig(instance) {
let slaveId = instance.config.get("instance.assigned_slave");
if (slaveId) {
if (slaveId !== null) {
let connection = this._master.wsServer.slaveConnections.get(slaveId);
if (connection) {
await libLink.messages.assignInstance.send(connection, {