aria.utils.Date.format fails with a TypeError when called with a null value #970

dpreussner opened this Issue Feb 6, 2014 · 0 comments


None yet
3 participants

dpreussner commented Feb 6, 2014

Basic example:

aria.utils.Date.format(null, "dd/MM/yyyy");
TypeError: Cannot call method 'getDate' of null

Proposal would be to add a check for invalid values and return null if the date cannot be formatted properly.

@jakub-g jakub-g closed this in 8820a68 Feb 7, 2014

@flongo flongo added this to the 1.4.16 milestone Feb 14, 2014

carlo-mr added a commit to carlo-mr/ariatemplates that referenced this issue Mar 3, 2014

fix #970 aria.utils.Date.format can now handle falsy values and empt…
…y objects

It now returns `null` in those cases instead of failing with a `TypeError`.

Close #971.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment