Closed silversonicaxel closed 5 years ago
Thanks for this detailed report! I was able to find the source of this error: when the search query (or the artist or the album name) contained periods, the lodash get()
was interpreting them as a separator between an object dj
and a key flugvél og geimskip
. This was solved properly escaping the query string by referencing it inside quotes, e.g.:
myObject.get(data, `foo['${query}'].bar`)
This can be seen more clearly in the commit fea8420, which solves this issue.
I also improved on how the artists were being referenced, as sometimes the searches would show empty results when the artist didn't have an mbid
.
Well done Enrico!
Describe the bug Some particular types of album/artist search are not working properly, maybe due to special characters as
.
or else.Steps to reproduce
dj. flugvél og geimskip
Expected behavior Albums and artist related to the search
dj. flugvél og geimskip
should appearDevice
Platform (please complete the following information):
Additional context The network tab of the browser dev area shows that API call return correctly the results, so error is within the javascript code. The search of
flugvél og geimskip
returns results correctly. That's the reason of the assumption of special characters as cause of the bug.