Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postmessages are generated with invalid data #142

Closed
bmhardy opened this issue Jan 19, 2017 · 0 comments · Fixed by #146
Closed

postmessages are generated with invalid data #142

bmhardy opened this issue Jan 19, 2017 · 0 comments · Fixed by #146
Assignees

Comments

@bmhardy
Copy link

bmhardy commented Jan 19, 2017

Do you want to request a feature or report a bug?
This is a request for information

What is the current behavior?
We're using the Algolia autocomplete module with our React application. We noticed that this autocomplete library is using postmessage to send messages.

The messages that the library is sending appear to have data that throw an exception if JSON.parse is called on the message data.

We have a requirement that our React module not be posting messages with data that does not pass JSON.parse.

We've seen messages that have empty data and other messages with data that starts with the string 'setImmediate$'. We need to subdue these messages.

Why is the autosuggest library generating these postmessages? Is there a way that we can stop these postmessages from being sent?

If the current behavior is a bug, please provide all the steps to reproduce and a minimal
JSFiddle example or a repository on GitHub that we can npm install
and npm start.

What is the expected behavior?
No postmessages are generated

@vvo vvo self-assigned this Jan 20, 2017
vvo pushed a commit that referenced this issue Jan 20, 2017
Before this commit, we were using setImmediate which was then
polyfilled by webpack in a way that is not efficient
and led to issues like #142 where postMessage was used
no matter what.

Now we use the `immediate` dependency which will first try
to use nextTick, then mutation observers (IE11) then fallback
to postMessage but in a way that should not bug any user
registering for global messages.

fixes #142
@vvo vvo closed this as completed in #146 Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants