Explorar o código

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

Yevhen Kozlov hai 1 ano
pai
achega
cd948d4136
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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';
 		}