Closed mattmcmanus closed 8 years ago
Thanks for this PR, good catch!
Hey @poteto! I pulled out the one change into a separate method. It feels a bit verbose, but it's clear. I also pinned jquery so that the tests would run.
implemented in fork/rename to hypersearcher... https://www.npmjs.com/package/ember-hypersearcher
@homu r+
:pushpin: Commit bdf5b01 has been approved by poteto
If you're using a hypersearch component to search for things that contain periods, like email addresses, as soon as you type the period things break. Since it's using the query itself as the key, Embers get/set gets all sorts of crankypants This commit replaces periods in queries as dashes.
I duplicated some of the tests to account for this scenario. It feels a bit ham-fisted, but I was hesitant to refactor the keyForQuery method to make it easily testable on its own.
Let me know if you have thoughts about how to do this better.