question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read properties of null (reading 'get_label') at MultiSelect.svelte:75

See original GitHub issue

In rare cases the line $: selectedLabels = selected.map(get_label)

https://github.com/janosh/svelte-multiselect/blob/8ab0d21a9793402fa8332bc9ced1fc3bcb340b24/src/lib/MultiSelect.svelte#L84-L85

raises

TypeError: Cannot read properties of null (reading 'get_label')
    at MultiSelect.svelte:75:33

Not sure exactly what is becoming null and what’s trying to access null.get_label but

$: selectedLabels = selected?.map(get_label) ?? []

seems to fix it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jesi-rgbcommented, Oct 9, 2022

Janosh, this works perfectly now. Thanks SO much for your super quick attention and fix, you’re literally the best.

Have a great Sunday!

0reactions
jesi-rgbcommented, Oct 8, 2022

You are the absolute best. Cannot check right now but will tomorrow morning. Thanks anyways for your effort!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR TypeError: Cannot read property 'isUpdate' of null ...
Steps to reproduce the issue. open a multi-select and select any item; while the drop-down is open, unselect the same item. Then Cannot...
Read more >
Vue-MultiSelect: Can't seem to get property from an object ...
The problem is the v-model="issue.customer_last_name" on the multi-select itself. That's setting the selection of the multi-select component ...
Read more >
Issue when deleting a line in a listview that contains ...
When it is deleted, we get the following error: "Cannot read property 'getGuid' of null TypeError: Cannot read property 'getGuid' of null".
Read more >
Vue-Multiselect | Vue Select Library
By default searchable is set to true, thus using search doesn't require any prop. The internal search engine is based on the label...
Read more >
Multi select
A business object list that populates the selection list when the Item lookup mode is Items From Config Option. ANY[]. Static list: Enter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found