From 5544167570e9452940635c87f3b93bd3aa3c379f Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Tue, 25 Oct 2022 23:54:42 +0800 Subject: [PATCH] linkcard --- source/js/plugins/linkcard.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/js/plugins/linkcard.js b/source/js/plugins/linkcard.js index 6309954..f7b57d7 100644 --- a/source/js/plugins/linkcard.js +++ b/source/js/plugins/linkcard.js @@ -25,7 +25,9 @@ function isHttp(url) { } function renderer(el, obj) { - el.querySelector('.title').innerHTML = obj.title; + if (obj.title && obj.title.length > 0) { + el.querySelector('.title').innerHTML = obj.title; + } if (obj.icon && obj.icon.length > 0) { el.querySelector('.img').style = 'background-image: url("' + obj.icon + '");'; }