Aframe: Array property type default share the same reference

Created on 6 Apr 2017  路  2Comments  路  Source: aframevr/aframe

Description:

schema: {
  foo: {type: 'array'},
  bar: {type: 'array'}
}

The two arrays share the same reference. If you push to bar, it will also be seen as pushed to foo.

It's fixed if I specify my own array:

schema: {
  foo: {type: 'array', default: []},
  bar: {type: 'array', default: []}
}
  • A-Frame Version: 0.5.0
bug help wanted (easy)

Most helpful comment

Could I try to fix this?

All 2 comments

Could I try to fix this?

Yeah!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonikorpi picture jonikorpi  路  4Comments

AdrienPoupa picture AdrienPoupa  路  6Comments

ghost picture ghost  路  3Comments

huhsame picture huhsame  路  3Comments

beyerz picture beyerz  路  3Comments