fix: undefined year, month, day values on postgres statistics
This commit is contained in:
parent
eb9139dbd0
commit
c984d1ef2f
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ export default abstract class DateMappingHelper {
|
||||||
static mapDate(entry: any) {
|
static mapDate(entry: any) {
|
||||||
switch (DB_TYPE) {
|
switch (DB_TYPE) {
|
||||||
case "postgres":
|
case "postgres":
|
||||||
return `${entry.years} years ${entry.months} months ${entry.days} days`;
|
return `${entry?.years ?? 0} years ${entry?.months ?? 0} months ${entry?.days ?? 0} days`;
|
||||||
case "mysql":
|
case "mysql":
|
||||||
return entry.toString();
|
return entry.toString();
|
||||||
case "sqlite":
|
case "sqlite":
|
||||||
|
|
Loading…
Add table
Reference in a new issue