scene.getGlowLayerByName() throws undefined (reading 'length') exception

Reproduction: Babylon.js Playground

Line 30 is the culprit.


  const layerMaybe = scene?.effectLayers?.length
    ? scene.getGlowLayerByName(name)
    : undefined;

Welcome aboard!

Thanks for reporting, I didn’t even know this function existed…

This PR will fix the problem:

1 Like

Seems like the helper also doesn’t know about it :stuck_out_tongue_winking_eye:
May be you could (request) update on this part as well?

It’s the doc of the function which was wrong, it will be fixed by the PR too.

1 Like