瀏覽代碼

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';
 		}