From 3f7bd39cc76eacf48da15dcbef60eb29ca4c9a12 Mon Sep 17 00:00:00 2001 From: i-zhaopin <65066131+i-zhaopin@users.noreply.github.com> Date: Fri, 31 Jul 2020 08:55:21 +0800 Subject: [PATCH] clockString.d padding according to daysremaining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clockString.d padding according to daysremaining, it's a bug when init daySting lenth greater than 2 --- src/flipdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flipdown.js b/src/flipdown.js index 35829cd..1cbbbc3 100644 --- a/src/flipdown.js +++ b/src/flipdown.js @@ -323,7 +323,7 @@ class FlipDown { **/ _updateClockValues(init = false) { // Build clock value strings - this.clockStrings.d = pad(this.clockValues.d, 2); + this.clockStrings.d = pad(this.clockValues.d, this.daysremaining); this.clockStrings.h = pad(this.clockValues.h, 2); this.clockStrings.m = pad(this.clockValues.m, 2); this.clockStrings.s = pad(this.clockValues.s, 2);