mirror of
https://github.com/Noratrieb/slides.git
synced 2026-01-14 16:35:07 +01:00
fix #3154
This commit is contained in:
parent
db4aa0c2e7
commit
31407082eb
5 changed files with 12 additions and 6 deletions
|
|
@ -203,8 +203,14 @@ const Plugin = () => {
|
|||
// that we remain connected to the notes even if the presentation
|
||||
// is reloaded.
|
||||
window.addEventListener( 'message', event => {
|
||||
if( !speakerWindow ) {
|
||||
let data = JSON.parse( event.data );
|
||||
if( !speakerWindow && typeof event.data === 'string' ) {
|
||||
let data;
|
||||
|
||||
try {
|
||||
data = JSON.parse( event.data );
|
||||
}
|
||||
catch( error ) {}
|
||||
|
||||
if( data && data.namespace === 'reveal-notes' && data.type === 'heartbeat' ) {
|
||||
reconnectSpeakerWindow( event.source );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue