nglviewer / ngl

WebGL protein viewer
http://nglviewer.org/ngl/
MIT License
664 stars 169 forks source link

Broaden undefined check when applying representation parameters. #989

Closed fredludlow closed 1 year ago

fredludlow commented 1 year ago

Some representation types (label) specifically set their parameters like 'linewidth' to null (e.g here) . If you try to setParameters({linewidth: 1.5}) this would attempt to access attributes on null in the Representation setParameters method here.

This one char fix avoids throwing an error (though obviously setting linewidth:1.5 on a label representation is meaningless anyway, but unhandled exceptions are bad).