From cd948d4136a43a2f7849f7fae772be45af223adb Mon Sep 17 00:00:00 2001 From: Yevhen Kozlov Date: Sun, 17 Sep 2023 23:29:31 +0200 Subject: [PATCH] Notes plugin: notes from data-notes attribute were not shown --- plugin/notes/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/notes/plugin.js b/plugin/notes/plugin.js index ecbf4ade977..fd8166676c0 100644 --- a/plugin/notes/plugin.js +++ b/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'; }