浏览代码

Notes plugin: notes from data-notes attribute were not shown

Yevhen Kozlov 1 年之前
父节点
当前提交
cd948d4136
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugin/notes/plugin.js

+ 1 - 1
plugin/notes/plugin.js

@@ -146,7 +146,7 @@ const Plugin = () => {
 		}
 
 		// Look for notes defined in an aside element
-		if( notesElements ) {
+		if( notesElements && notesElements.length ) {
 			messageData.notes = Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
 			messageData.markdown = notesElements[0] && typeof notesElements[0].getAttribute( 'data-markdown' ) === 'string';
 		}