Skip to content

Commit

Permalink
fix(merge): updates MergeAppend function for booleans with False values
Browse files Browse the repository at this point in the history
Fixed #248

Signed-off-by: Emin Aktas <[email protected]>
  • Loading branch information
eminaktas committed Oct 19, 2024
1 parent 3599253 commit 35bb39e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion merge/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ schema MergeAppend[a, b]:
"""
value?: {str:} = {
k: [*v, *b[k]] if typeof(v) == "list" and typeof(b[k]) == "list" else v | b[k] \
if typeof(v) == typeof(b[k]) and typeof(v) not in ["str", "bool", "int", "float"] else b[k] or v \
if typeof(v) == typeof(b[k]) and typeof(v) not in ["str", "bool", "int", "float"] else b[k] if b[k] is not None else v \
for k, v in a
} | {k: v for k, v in b if not a[k]}

Expand Down

0 comments on commit 35bb39e

Please sign in to comment.