From 22546357f30924fcff3b3ffa14fd04be21f97a5e Mon Sep 17 00:00:00 2001 From: Svend Date: Tue, 19 Sep 2023 21:56:31 +0800 Subject: [PATCH] fix: update $x logic to avoid plugin error (#2429) --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index d26a401a..061ade17 100644 --- a/src/index.js +++ b/src/index.js @@ -86,12 +86,12 @@ class Dayjs { constructor(cfg) { this.$L = parseLocale(cfg.locale, null, true) this.parse(cfg) // for plugin + this.$x = this.$x || cfg.x || {} this[IS_DAYJS] = true } parse(cfg) { this.$d = parseDate(cfg) - this.$x = cfg.x || {} this.init() }