From cc695020d83e73f8b725ed43986465320c6fb2bc Mon Sep 17 00:00:00 2001 From: Ole Martin Handeland Date: Tue, 15 Nov 2022 15:06:30 +0100 Subject: [PATCH] Bugfix: Crash when `null` in `textResourceBindings` (#659) Co-authored-by: Ole Martin Handeland --- src/altinn-app-frontend/src/features/expressions/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/altinn-app-frontend/src/features/expressions/index.ts b/src/altinn-app-frontend/src/features/expressions/index.ts index 3b38a7ed7f..ac68bd8027 100644 --- a/src/altinn-app-frontend/src/features/expressions/index.ts +++ b/src/altinn-app-frontend/src/features/expressions/index.ts @@ -55,7 +55,7 @@ export function evalExprInObj(args: EvalExprInObjArgs): ExprResolved { * Recurse through an input object/array/any, finds expressions and evaluates them */ function evalExprInObjectRecursive(input: any, args: Omit, 'input'>, path: string[]) { - if (typeof input !== 'object') { + if (typeof input !== 'object' || input === null) { return input; }