mclintprojects / actioncable-vue

A Vue plugin that makes integrating Rails Action Cable dead-easy.
MIT License
182 stars 37 forks source link

Object.entries is not a function #41

Closed itsameandrea closed 3 years ago

itsameandrea commented 3 years ago

Describe the bug For some users the library errors out throwing Object.entries is not a function. At first I thought this was an issue with IE as Object.entries does not work on IE, however, since plugging in AppSignal I've seen that the user agent is not matching IE.

To Reproduce I wasn't able to reproduce the error on my own

Expected behaviour No errors being thrown

Screenshots image image

Plugin version (please complete the following information): 2.3.2

Additional context Sorry for the lack of information so far - though I can add some context. This application is mostly used inside the Facebook webview. My (very rough) guess is that some version of the Facebook browser don't support Object.entries either.

Likely the error comes from this file here as Object.entries is used a couple of times.

I'd imagine that the solution would be to have a simple polyfill like this.

Happy to create a PR to get it fixed if you're too busy to do it.

mclintprojects commented 3 years ago

@ilrock Kindly create the PR. I'll review, merge and publish a new version.

itsameandrea commented 3 years ago

Thanks @mclintprojects!

Just created a PR - I haven't found any contribution guide so I hope the structure I used works for you.

If it doesn't let me know and I'll make the necessary changes.

mclintprojects commented 3 years ago

@ilrock Thanks for the PR. I've merged and published v2.4.3.