mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-04 13:47:37 +02:00
Notes: don't error on non-string message
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -180,6 +180,7 @@ const Plugin = () => {
|
|||||||
// (added 12/5/22 as a XSS safeguard)
|
// (added 12/5/22 as a XSS safeguard)
|
||||||
if( isSameOriginEvent( event ) ) {
|
if( isSameOriginEvent( event ) ) {
|
||||||
|
|
||||||
|
try {
|
||||||
let data = JSON.parse( event.data );
|
let data = JSON.parse( event.data );
|
||||||
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
|
if( data && data.namespace === 'reveal-notes' && data.type === 'connected' ) {
|
||||||
clearInterval( connectInterval );
|
clearInterval( connectInterval );
|
||||||
@@ -188,6 +189,7 @@ const Plugin = () => {
|
|||||||
else if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
|
else if( data && data.namespace === 'reveal-notes' && data.type === 'call' ) {
|
||||||
callRevealApi( data.methodName, data.arguments, data.callId );
|
callRevealApi( data.methodName, data.arguments, data.callId );
|
||||||
}
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user