Skip to content

Commit acc5236

Browse files
committed
fix(default): Fix default function of core package
1 parent 19720b6 commit acc5236

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

  • packages/tal-stdlib/src/functions

packages/tal-stdlib/src/functions/core.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,7 @@ export const default$ = defineFunction3(
237237
['T'],
238238
typeGenericPlaceholder('T')
239239
),
240-
(_ctx, _kwargs, args) => {
241-
for (let arg of args) {
242-
if (arg != null) {
243-
return arg;
244-
}
245-
}
246-
return null;
247-
},
240+
(_ctx, { value, orElse }) => value ?? orElse,
248241
undefined,
249242
{
250243
description: 'Returns the first non null value',

0 commit comments

Comments
 (0)