sillsdev / mui-language-picker

Material UI react language picker
MIT License
4 stars 3 forks source link

Crashes on some search queries #23

Closed imnasnainaec closed 4 months ago

imnasnainaec commented 4 months ago

A handful of search queries cause the whole React app to crash, including "aa", "aaa", "aab", ... "aaz", "aa", "ac", "ad", "al", "ala", "alc", "an", "anc", "aq", "as", "ax", "bl", "bu", ...

It seems these queries are bringing up a specific result (or results) that is missing an expected field. This is the console error:

TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at index.abd3b0b2.js:322:23560
    at Array.forEach (<anonymous>)
    at Io (index.abd3b0b2.js:322:23514)
    at A (index.abd3b0b2.js:322:25066)
    at $3 (index.abd3b0b2.js:30:19556)
    at vw (index.abd3b0b2.js:32:3173)
    at k9 (index.abd3b0b2.js:32:45204)
    at L9 (index.abd3b0b2.js:32:40066)
    at Sz (index.abd3b0b2.js:32:39994)
    at wd (index.abd3b0b2.js:32:39847)
imnasnainaec commented 4 months ago

Fixed in v2.2.1 by https://github.com/sillsdev/mui-language-picker/commit/9a844626d498b415040b0c419c36f9ab028a9f70