From ffeb0916c0ea525c816b993013ca5369a788d906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Mass=C3=A9?= <59894025+samuelmasse@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:51:14 -0400 Subject: [PATCH] fix(instances): fix instance service destroy (#155) --- packages/server/src/instances/service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/server/src/instances/service.ts b/packages/server/src/instances/service.ts index 40ebab16a..b9b548e06 100644 --- a/packages/server/src/instances/service.ts +++ b/packages/server/src/instances/service.ts @@ -103,8 +103,10 @@ export class InstanceService extends Service { } for (const conduitId of this.cache.keys()) { - const instance = this.cache.get(conduitId)! - await this.handleCacheDispose(conduitId, instance) + const instance = this.cache.get(conduitId) + if (instance) { + await this.handleCacheDispose(conduitId, instance) + } } }