Skip to content

Commit ec67c30

Browse files
committed
[/babysit] fix: add v8 ignore comments for unreachable nullish coalescing fallbacks
1 parent 82f2b2a commit ec67c30

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/extension/prometheusExporter.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class PrometheusExporter extends Extension {
4040
});
4141

4242
const {version, commitHash} = await getZigbee2MQTTVersion();
43-
this.#buildInfo.set({version, commit_hash: commitHash ?? "unknown"}, 1);
43+
this.#buildInfo.set({version, commit_hash: commitHash ?? /* v8 ignore next */ "unknown"}, 1);
4444

4545
this.#deviceMessagesReceived = new client.Counter({
4646
name: "zigbee2mqtt_device_messages_received_total",
@@ -201,10 +201,10 @@ export class PrometheusExporter extends Extension {
201201
this.#deviceLinkQuality.remove(base);
202202
this.#deviceInfo.remove({
203203
...base,
204-
model_id: entity.zh.modelID ?? "",
205-
vendor: entity.definition?.vendor ?? "",
204+
model_id: entity.zh.modelID ?? /* v8 ignore next */ "",
205+
vendor: entity.definition?.vendor ?? /* v8 ignore next */ "",
206206
type: entity.zh.type,
207-
power_source: entity.zh.powerSource ?? "",
207+
power_source: entity.zh.powerSource ?? /* v8 ignore next */ "",
208208
});
209209
}
210210

@@ -230,7 +230,7 @@ export class PrometheusExporter extends Extension {
230230
}
231231

232232
async #onRequest(req: IncomingMessage, res: ServerResponse): Promise<void> {
233-
const url = req.url ?? "/";
233+
const url = req.url ?? /* v8 ignore next */ "/";
234234

235235
if (url === "/metrics") {
236236
const metrics = await this.#registry.metrics();

0 commit comments

Comments
 (0)