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