-
-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem description
isEmpty() throws a Cannot convert a BigInt value to a number.
Related code
danfojs/src/danfojs-base/shared/utils.ts
Lines 93 to 95 in f272a7e
| isEmpty<T>(value: T): boolean { | |
| return value === undefined || value === null || (isNaN(value as any) && typeof value !== "string"); | |
| } |
Solution
Using isNaN(Number(value)) fixes the issue.
Discussion
Looking at the other isNaN() calls in said file it looks like some places are using Number(value) while some others don't.
I suspect some other methods would throw in the same way.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working