mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
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:
1 parent
5ad89f072f
commit
3d186a24ff
3 files changed
+5
-5
No files matched your search
@@ -58,11 +58,11 @@ class WebConsoleFormat {
|
||||
|
||||
transform(info, options) {
|
||||
let src = " ";
|
||||
if (info.slave_id) {
|
||||
if (info.slave_id !== undefined) {
|
||||
let slaveName = info.slave_id;
|
||||
src += `s:${slaveName} - `;
|
||||
}
|
||||
if (info.instance_id) {
|
||||
if (info.instance_id !== undefined) {
|
||||
let instanceName = info.instance_id;
|
||||
src += `i:${instanceName}`;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user