fix getAttribute exception in notes plugin #3285
This commit is contained in:
parent
468132320d
commit
fb68f1c389
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -148,7 +148,7 @@ const Plugin = () => {
|
||||||
// Look for notes defined in an aside element
|
// Look for notes defined in an aside element
|
||||||
if( notesElements ) {
|
if( notesElements ) {
|
||||||
messageData.notes = Array.from(notesElements).map( notesElement => notesElement.innerHTML ).join( '\n' );
|
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 ), '*' );
|
speakerWindow.postMessage( JSON.stringify( messageData ), '*' );
|
||||||
|
|
Loading…
Reference in New Issue