zendesk / cross-storage

Cross domain local storage, with permissions
Apache License 2.0
2.22k stars 180 forks source link

Error when message.data is not string #17

Closed ericfong closed 9 years ago

ericfong commented 9 years ago

Hi

Thanks for your works.

I just got

Uncaught TypeError: message.data.indexOf is not a function

in https://github.com/zendesk/cross-storage/blob/master/lib/client.js#L288

while putting cross-storage with webpack, browser-sync and react-hot-reload. Some of my module also use window messaging system which have message.data in Number type.

Please use typeof to check the message.data?

danielstjules commented 9 years ago

Thanks for letting us know! We'll get a fix out soon.

danielstjules commented 9 years ago

Fixed in https://github.com/zendesk/cross-storage/commit/210c8462c5032af24b600f25293ae6cada80fb00 Thanks!