Skip to content

Commit

Permalink
Merge pull request writer#348 from raaymax/fix-evaluator-bug
Browse files Browse the repository at this point in the history
fix: evaluator fails for objects when no default value is set
  • Loading branch information
ramedina86 authored Mar 25, 2024
2 parents aaf23f8 + 23f70b7 commit 0481cdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/renderer/useEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function useEvaluator(ss: Core) {
evaluated === "";
if (fieldType == FieldType.Object || fieldType == FieldType.KeyValue) {
if (!evaluated) {
return JSON.parse(defaultValue) ?? null;
return JSON.parse(defaultValue ?? null);
}
if (typeof evaluated !== "string") return evaluated;
let parsedValue: any;
Expand Down

0 comments on commit 0481cdf

Please sign in to comment.