Skip to content

Commit 3140708

Browse files
committed
fix #3154
1 parent db4aa0c commit 3140708

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

plugin/math/math.esm.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/math/math.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/notes/notes.esm.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/notes/notes.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/notes/plugin.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,14 @@ const Plugin = () => {
203203
// that we remain connected to the notes even if the presentation
204204
// is reloaded.
205205
window.addEventListener( 'message', event => {
206-
if( !speakerWindow ) {
207-
let data = JSON.parse( event.data );
206+
if( !speakerWindow && typeof event.data === 'string' ) {
207+
let data;
208+
209+
try {
210+
data = JSON.parse( event.data );
211+
}
212+
catch( error ) {}
213+
208214
if( data && data.namespace === 'reveal-notes' && data.type === 'heartbeat' ) {
209215
reconnectSpeakerWindow( event.source );
210216
}

0 commit comments

Comments
 (0)