From 997936328ed8699a7cfc05969d8d05e16681c763 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 23 Oct 2023 22:53:24 +0300 Subject: [PATCH] fix(core-resource): error getter (#2077) --- webapp/packages/core-resource/src/Resource/Resource.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/packages/core-resource/src/Resource/Resource.ts b/webapp/packages/core-resource/src/Resource/Resource.ts index 12cc9a18f6..40357c32a5 100644 --- a/webapp/packages/core-resource/src/Resource/Resource.ts +++ b/webapp/packages/core-resource/src/Resource/Resource.ts @@ -122,6 +122,10 @@ export abstract class Resource< getException(param: ResourceKeyList): Error[] | null; getException(param: ResourceKey): Error[] | Error | null; getException(param: ResourceKey): Error[] | Error | null { + if (param === undefined) { + param = CachedResourceParamKey; + } + if (isResourceKeyList(param)) { return this.metadata.map(param, metadata => metadata?.exception || null).filter((exception): exception is Error => exception !== null); }