cozydev-pink / protosearch

prototype search library in pure scala
https://cozydev-pink.github.io/protosearch/
Apache License 2.0
9 stars 6 forks source link

Fix query access in web worker onmessage #91

Closed valencik closed 1 year ago

valencik commented 1 year ago

Previously we were only grabbing the first letter of the query string in the web worker.

Screenshot 2023-07-16 at 19-17-54 JS Interop Search

I was looking at http://www.devdoc.net/web/developer.mozilla.org/en-US/docs/Web/API/Worker/onmessage.html

And it looks like e.data is the whole payload, so e.data[0] would be accessing the first element of the payload, in our case, the first character of the query string.