elykia 1.0.30 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blog/countdown.js +4 -1
- package/package.json +1 -1
package/blog/countdown.js
CHANGED
|
@@ -50,7 +50,10 @@ const elykiaCountdown = {
|
|
|
50
50
|
const elements = ['eventName', 'eventDate', 'daysUntil', 'countRight']
|
|
51
51
|
.map(id => document.getElementById(id));
|
|
52
52
|
|
|
53
|
-
if (elements.some(el => !el))
|
|
53
|
+
if (elements.some(el => !el)) {
|
|
54
|
+
setTimeout(elykiaCountdown.updateCountdown, 200); // 元素不存在就 200ms 后重试
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
54
57
|
|
|
55
58
|
const [eventName, eventDate, daysUntil, countRight] = elements;
|
|
56
59
|
const config = elykiaCountdown.config;
|