-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfesthacktoberfest2021helper
Description
Describe the bug
The first
, last
and itemAt
helpers return null when the item is falsy.
Template
{{first arr}} is {{typeof (first arr)}}
Context
{
"arr": [0, 1, 2]
}
Broken Output
is object
Expected Output
0 is number
Additional information
In the helper definition ||
is used instead of ??
(nullish coalescing operator):
array.ts:8, array.ts:16, array.ts:27
If you're confortable with testing, make sure to include tests that assure this is fixed:
array-helpers.spec.js:12
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershacktoberfesthacktoberfest2021helper