Ignore empty-string messages (sent by some libraries to check postMessage behavior, unactionable and currently throwing errors)
Only attempt deserialization if typeof is string - back when postmessage was created, the window.postMessage interface apparently required serialization, but today it can and does pass native objects
Ignore empty-string messages (sent by some libraries to check postMessage behavior, unactionable and currently throwing errors)
Only attempt deserialization if
typeof
isstring
- back when postmessage was created, thewindow.postMessage
interface apparently required serialization, but today it can and does pass native objects