From 6e62df408ee2b6cf035809de4e2fd6d67fc41eb1 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Mon, 1 Aug 2022 23:37:55 +0700 Subject: [PATCH] Fix --- src/main/plugins/raop.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/plugins/raop.ts b/src/main/plugins/raop.ts index b532c681..9f0300d6 100644 --- a/src/main/plugins/raop.ts +++ b/src/main/plugins/raop.ts @@ -90,7 +90,7 @@ export default class RAOP { private ondeviceup(name: any, host: any, port: any, addresses: any, text: any, airplay2: any = null) { // console.log(this.castDevices.findIndex((item: any) => {return (item.name == host.replace(".local","") && item.port == port )})) - if (this.castDevices.findIndex((item: any) => {return (item.name == host.replace(".local","") && item.port == port )}) == -1) { + if (this.castDevices.findIndex((item: any) => {return (item != null && item.name == (host ?? "Unknown").replace(".local","") && item.port == port )}) == -1) { this.castDevices.push({ name: (host ?? "Unknown").replace(".local",""), host: addresses ? addresses[0] : '',