diff options
author | Hakim El Hattab | 2015-02-25 13:26:45 +0100 |
---|---|---|
committer | Hakim El Hattab | 2015-02-25 13:26:53 +0100 |
commit | ea735f0a2f4983a54bed94e2ce83f6ebe297a225 (patch) | |
tree | 74b7ccb8b473ba9125ea1a8a7cb77368a1dbfe68 /js | |
parent | 4c0a033dfa452cfef5d880131a9685a918a29945 (diff) |
ensure postmessage data is a string #1143
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 2 |
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 |