RienNeVaPlus / wikifolio

📊 Wikifolio (unofficial) API
18 stars 6 forks source link

Set todaysFirstTick to null if it is null #9

Closed jekru closed 2 years ago

jekru commented 3 years ago

In my previous PR #8, in the Wikifolio.ts file, I made this change:

- data.todaysFirstTick = toDate(data.todaysFirstTick)
+ data.todaysFirstTick = !data.todaysFirstTick ?? toDate(data.todaysFirstTick)

This fixes the error TypeError: Cannot read property 'includes' of null but also sets todaysFirstTick to true because of !data.todaysFirstTick what makes not really sense because the 'real' value is still null.

JulianGlattki commented 2 years ago

Can this fix be merged please? @RienNeVaPlus