Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

util.isEmpty incorrectly reports Date object as "empty" #283

Open
kczx3 opened this issue May 13, 2022 · 1 comment
Open

util.isEmpty incorrectly reports Date object as "empty" #283

kczx3 opened this issue May 13, 2022 · 1 comment

Comments

@kczx3
Copy link

kczx3 commented May 13, 2022

const isEmpty = (o) => typeof o === 'undefined'

The documentation states that lowerLimit and upperLimit of each axis type (x, y, y2) can be a "number or Date". Unfortunately, GraphConfig.validateInput uses the util.isEmpty helper which returns true for a Date object. Yet, if I set either the lowerLimit or upperLimit properties on an existing Graph instance then call reflowMultipleDatasets, it works just fine and doesn't complain.

I'm not sure how you want to determine what is at fault here. Perhaps util.isEmpty is not faulty and it should simply not be used when validating the axis limits. I'll let you all decide.

@chrismichalewicz
Copy link

Investigation Jira UXPLATFORM-6894 has been created to track this internally.

@chrismichalewicz chrismichalewicz added this to the Backlog milestone Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants