From d19ad9612fe22d2925e1a5efe25deb0f7e96b931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9A=81=E7=BE=8E=E3=80=80=E7=84=94?= <14120445+lixiang810@users.noreply.github.com> Date: Sat, 7 Jan 2023 22:07:15 +0800 Subject: [PATCH] fix: wrong behavior when there's no img provided for qrcode (#840) --- layout/_plugins/share/layout.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_plugins/share/layout.ejs b/layout/_plugins/share/layout.ejs index dd2983277..b8bd9f08c 100644 --- a/layout/_plugins/share/layout.ejs +++ b/layout/_plugins/share/layout.ejs @@ -1,7 +1,7 @@
<% getList(theme.article.body.meta_library.share).forEach(function(item){ %> - <% if (item.id == 'qrcode'){ %> + <% if (item.id == 'qrcode' && (item.img || item.icon)){ %> <% var src = qrcode(url,{margin:1,size:8}); %>