mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-01-17 05:18:27 +01:00
Notes: don't error on non-string message
This commit is contained in:
parent
488c5c8f94
commit
2fb4b46307
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -180,14 +180,16 @@ const Plugin = () => {
|
|||||||
// (added 12/5/22 as a XSS safeguard)
|
// (added 12/5/22 as a XSS safeguard)
|
||||||
if( isSameOriginEvent( event ) ) {
|
if( isSameOriginEvent( event ) ) {
|
||||||
|
|
||||||
let data = JSON.parse( event.data );
|
try {
|
||||||
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
|
let data = JSON.parse( event.data );
|
||||||
clearInterval( connectInterval );
|
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
|
||||||
onConnected();
|
clearInterval( connectInterval );
|
||||||
}
|
onConnected();
|
||||||
else if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
|
}
|
||||||
callRevealApi( data.methodName, data.arguments, data.callId );
|
else if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
|
||||||
}
|
callRevealApi( data.methodName, data.arguments, data.callId );
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user