Select to view content in your preferred language

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'some')

602
2
11-16-2022 02:55 PM
_____
by
Frequent Contributor

//

Tags (2)
0 Kudos
2 Replies
ReneRubalcava
Honored Contributor

Do you have a sample showing this behavior? I wasn't able to repro here. I thought maybe it was the adding and removing layer simultaneously, but that didn't trigger an error.

https://codepen.io/odoe/pen/BaVwdEg?editors=1000

0 Kudos
_____
by
Frequent Contributor

Sorry Rene, I figured it out after I posted... I tried to delete the post but it wouldn't let me. And now I can't get the original post back.

I realized I had another layer where I was setting:

 

layer.labelingInfo = null

 

And that's what's throwing the error, where it worked in v4.21.

It looks like I should be using labelsVisible instead.