multixy: avoid error when points property is invalid (#685)
This commit is contained in:
parent
b7765cee7d
commit
bb5411dfab
1 changed files with 2 additions and 2 deletions
|
|
@ -49,8 +49,8 @@ module.exports = class MultiXy extends Pad {
|
|||
|
||||
super(options)
|
||||
|
||||
this.npoints = typeof this.getProp('points') == 'object' ? this.getProp('points').length : this.getProp('points')
|
||||
this.labels = typeof this.getProp('points') == 'object'
|
||||
this.npoints = Array.isArray(this.getProp('points')) ? this.getProp('points').length : this.getProp('points') || 0
|
||||
this.labels = Array.isArray(this.getProp('points'))
|
||||
this.pointSize = parseInt(this.getProp('pointSize'))
|
||||
|
||||
this.pads = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue