pex-renderer icon indicating copy to clipboard operation
pex-renderer copied to clipboard

Geometry.set(falsyValue) throws an error

Open dmnsgn opened this issue 6 years ago • 2 comments

Trying to get ctx from null

Geometry.prototype.set = function(opts) {
  const ctx = opts.ctx || this.ctx

Solution: default to opts = {}

dmnsgn avatar Sep 18 '19 12:09 dmnsgn

What's the default parameters support in the browsers?

When would you call geometry.set(null) ?

vorg avatar Sep 18 '19 13:09 vorg

Pretty good: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters#Browser_compatibility

geometry.set(null) unintentionally of course in Nodes. But could be used to clean buffers pr something maybe (thinking out loud)?

dmnsgn avatar Sep 18 '19 13:09 dmnsgn