From cba209eb2c230af50e6612408ba0439f38c846db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Sat, 16 Dec 2023 23:00:31 -0800 Subject: [PATCH] Fixed linter warnings --- modules/ui/fields/date.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ui/fields/date.js b/modules/ui/fields/date.js index a338272768c..9cbaddd57b7 100644 --- a/modules/ui/fields/date.js +++ b/modules/ui/fields/date.js @@ -190,17 +190,17 @@ export function uiFieldDate(field, context) { let value = ''; let year = parseInt(context.cleanTagValue(yearValue), 10); if (eraValue === bceName) { - value += '-' + (year - 1 + '').padStart(4, '0'); + value += '-' + String(year - 1).padStart(4, '0'); } else { - value += (year + '').padStart(4, '0'); + value += String(year).padStart(4, '0'); } let month = context.cleanTagValue(monthValue); if (monthNames.includes(month)) { month = monthNames.indexOf(month) + 1; - value += '-' + (month + '').padStart(2, '0'); + value += '-' + String(month).padStart(2, '0'); let day = parseInt(context.cleanTagValue(dayValue), 10); if (!isNaN(day)) { - value += '-' + (day + '').padStart(2, '0'); + value += '-' + String(day).padStart(2, '0'); } } tag[field.key] = value;