Fix tests

This commit is contained in:
Koen Kanters 2020-10-03 23:24:08 +02:00
parent 0c36b7894b
commit 2a08127e13

View File

@ -48,7 +48,8 @@ class NetworkMap extends Extension {
this.supportedFormats.hasOwnProperty(message)) {
const includeRoutes = topic === this.legacyTopicRoutes;
const topology = await this.networkScan(includeRoutes);
const converted = this.supportedFormats[message](topology);
let converted = this.supportedFormats[message](topology);
converted = message === 'raw' ? stringify(converted) : converted;
this.mqtt.publish(`bridge/networkmap/${message}`, converted, {});
}
}