fix: handle undefined desktop service when running in web environment

This commit is contained in:
Mo
2022-04-25 13:32:55 -05:00
parent d0d97a8dbc
commit e8ed38bcb2

View File

@@ -77,9 +77,14 @@ export class WebApplication extends SNApplication {
} }
for (const service of Object.values(this.webServices)) { for (const service of Object.values(this.webServices)) {
if (!service) {
continue
}
if ('deinit' in service) { if ('deinit' in service) {
service.deinit?.(source) service.deinit?.(source)
} }
;(service as { application?: WebApplication }).application = undefined ;(service as { application?: WebApplication }).application = undefined
} }