From 3fac56da7fedfd00b929ec98d08825473d8c9254 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Fri, 3 Mar 2023 22:44:18 +0100 Subject: [PATCH] fix: sapi service use viewer --- src/atlasComponents/sapi/sapi.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts index 196567eb0..38945b970 100644 --- a/src/atlasComponents/sapi/sapi.service.ts +++ b/src/atlasComponents/sapi/sapi.service.ts @@ -461,6 +461,9 @@ export class SAPI{ } public useViewer(template: SxplrTemplate) { + if (!template) { + return of(null as keyof typeof atlasAppearance.const.useViewer) + } return forkJoin({ voxel: this.getVoxelTemplateImage(template), surface: this.getSurfaceTemplateImage(template) -- GitLab