widgets: remove unnused properties to avoid having hidden properties laying around when the type changes (especially dangerous when those properties where linked to other widgets)
This commit is contained in:
parent
f49dbfe07e
commit
9f9da33e0f
2 changed files with 10 additions and 1 deletions
|
|
@ -48,6 +48,10 @@ var Parser = class Parser {
|
|||
if (i.indexOf('_')!=0 && props[i]===undefined) props[i] = defaults[i]
|
||||
}
|
||||
|
||||
for (let j in props) {
|
||||
if (defaults[j] === undefined || j[0] === '_') delete props[j]
|
||||
}
|
||||
|
||||
// Genrate widget's id, based on its type
|
||||
if (props.id=='auto' || !props.id ) {
|
||||
var id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue