Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Renderer this.renderDate #376

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smg6511
Copy link

@smg6511 smg6511 commented Jun 11, 2021

CONTEXT:
Column rendering of dates in migxdb

PROBLEM:
When a unix timestamp is passed into the renderDate function, it's data type may be string instead of number (even though the database's column type is int). In this case, renderDate currently fails to recognize the data as a numeric timestamp and returns an empty string.

SOLUTION:
Adds a basic regex test for unix timestamp and explicitly casts a match to number (via parseInt) to ensure numeric string timestamps are rendered properly.

Add a basic regex test for unix timestamp (casting string matched to number) instead of assuming incoming value's data type is number
@smg6511 smg6511 changed the title Update renderDate Fix Renderer this.renderDate Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant