diff --git a/src/atlasComponents/sapi/sapi.service.ts b/src/atlasComponents/sapi/sapi.service.ts index 0fec93688ff9f67edbcac8dfec02043e374a1e36..0750c09315d429dee2d64b41680eecdd6288b35a 100644 --- a/src/atlasComponents/sapi/sapi.service.ts +++ b/src/atlasComponents/sapi/sapi.service.ts @@ -96,7 +96,7 @@ export class SAPI{ static get BsEndpoint$(): Observable<string> { if (!!BS_ENDPOINT_CACHED_VALUE) return BS_ENDPOINT_CACHED_VALUE const rootEl = document.querySelector('atlas-viewer') - const overwriteSapiUrl = rootEl.getAttribute(CONST.OVERWRITE_SAPI_ENDPOINT_ATTR) + const overwriteSapiUrl = rootEl?.getAttribute(CONST.OVERWRITE_SAPI_ENDPOINT_ATTR) const endpoints = overwriteSapiUrl ? [ overwriteSapiUrl ] diff --git a/src/viewerModule/nehuba/mesh.service/mesh.service.spec.ts b/src/viewerModule/nehuba/mesh.service/mesh.service.spec.ts index 7db5392a46b74554df8c9e2db2ab8d5e221ab44b..f5bea95d183a58649bb52caedbd27430cfc2b47c 100644 --- a/src/viewerModule/nehuba/mesh.service/mesh.service.spec.ts +++ b/src/viewerModule/nehuba/mesh.service/mesh.service.spec.ts @@ -107,6 +107,10 @@ describe('> mesh.service.ts', () => { [labelIndex2]: fits2 } }) + const mockStore = TestBed.inject(MockStore) + + mockStore.overrideSelector(atlasSelection.selectors.selectedTemplate, {} as any) + mockStore.overrideSelector(atlasSelection.selectors.selectedParcellation, {} as any) }) describe("> auxMesh defined", () => {