fix #3154
This commit is contained in:
parent
db4aa0c2e7
commit
31407082eb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -203,8 +203,14 @@ const Plugin = () => {
|
|||||||
// that we remain connected to the notes even if the presentation
|
// that we remain connected to the notes even if the presentation
|
||||||
// is reloaded.
|
// is reloaded.
|
||||||
window.addEventListener( 'message', event => {
|
window.addEventListener( 'message', event => {
|
||||||
if( !speakerWindow ) {
|
if( !speakerWindow && typeof event.data === 'string' ) {
|
||||||
let data = JSON.parse( event.data );
|
let data;
|
||||||
|
|
||||||
|
try {
|
||||||
|
data = JSON.parse( event.data );
|
||||||
|
}
|
||||||
|
catch( error ) {}
|
||||||
|
|
||||||
if( data && data.namespace === 'reveal-notes' && data.type === 'heartbeat' ) {
|
if( data && data.namespace === 'reveal-notes' && data.type === 'heartbeat' ) {
|
||||||
reconnectSpeakerWindow( event.source );
|
reconnectSpeakerWindow( event.source );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user