소스 검색

fix getAttribute exception in notes plugin #3285

hakimel 2 년 전
부모
커밋
fb68f1c389
3개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 0
      plugin/notes/notes.esm.js
  2. 0 0
      plugin/notes/notes.js
  3. 1 1
      plugin/notes/plugin.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
plugin/notes/notes.esm.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
plugin/notes/notes.js


+ 1 - 1
plugin/notes/plugin.js

@@ -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 ), '*' );

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.