From a3ab2be0b070a1bacc4fec3c2d2f0ffe279bada0 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Fri, 12 Apr 2024 23:17:45 -0500 Subject: [PATCH] fix: prevent unnecessary themeColor deprecation notice (#2403) --- src/core/config.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/core/config.js b/src/core/config.js index 9d9f8e31d..e3a191157 100644 --- a/src/core/config.js +++ b/src/core/config.js @@ -47,17 +47,19 @@ export default function (vm) { return this.__themeColor; }, set themeColor(value) { - this.__themeColor = value; - console.warn( - stripIndent(/* html */ ` - $docsify.themeColor is deprecated. Use a --theme-color property in your style sheet. Example: - - `).trim() - ); + if (value) { + this.__themeColor = value; + console.warn( + stripIndent(` + $docsify.themeColor is deprecated. Use a --theme-color property in your style sheet. Example: + + `).trim() + ); + } }, },