Closed johanrd closed 1 week ago
I'm not sure if this is really an issue of EPS, because from type we allow only string for searchTerm
.
This means that when the app is not passing a string, its an incorrect using, which should be fixed inside app.
In the typed world you issue will never appear, but in JS its always everything possible.
ok, thanks. FYI: I am in a fully typed world (all .gts) and do not get any glint errors in my component usage. Still this issue appears in sentry.
Hmm... can you share the example like you are using? Because with TS it should bring an error
Closing in favor of no aditional feedback
Hi. In sentry I have some reports on
Cannot read properties of null (reading 'length')
onthis.searchText.length > 0
on get results()Not sure if I am stretching the usage here, but anyways, I think ember-power-select should be resilient towards this.
Two fixes I can think of:
1) Optional chaining on all consumers of this.searchText.length (i.e.
this.searchText?.length
)2) Nullish coalescing on all assignments to this.searchText to ensure it is not null or undefined?