aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/reveal.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 0e60745..850f431 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -795,7 +795,7 @@
var data = event.data;
// Make sure we're dealing with JSON
- if( data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) {
+ if( typeof data === 'string' && data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) {
data = JSON.parse( data );
// Check if the requested method can be found