diff --git a/src/assets/scripts/renderers/wx-renderer.js b/src/assets/scripts/renderers/wx-renderer.js
index 3e954b4..8fe8c42 100644
--- a/src/assets/scripts/renderers/wx-renderer.js
+++ b/src/assets/scripts/renderers/wx-renderer.js
@@ -168,14 +168,17 @@ class WxRenderer {
return `
${text}
`;
};
renderer.image = (href, title, text) => {
- let subText = "";
- if (text) {
- subText = `${text}`;
- }
- let figureStyles = getStyles("figure");
- let imgStyles = getStyles("image");
+ const createSubText = (s) => {
+ if (!s) {
+ return "";
+ }
+
+ return `${s}`;
+ };
+
+ const subText = createSubText(title || text);
+ const figureStyles = getStyles("figure");
+ const imgStyles = getStyles("image");
return ``;
};
renderer.link = (href, title, text) => {