script: always provide id in built in script

This commit is contained in:
bordun 2020-04-01 13:49:14 +02:00
parent b23d60bc02
commit 940ccfb4b0

View file

@ -200,7 +200,7 @@ class Widget extends EventEmitter {
event: 'value'
}, builtIn: true, parent: this})
this.on('change', (e)=>{
if (e.widget === this && this.mounted && !e.options.fromEdit) this.script.setValue(this.value, {...e.options, id: e.id})
if (e.widget === this && this.mounted && !e.options.fromEdit) this.script.setValue(this.value, {...e.options, id: e.options.id || e.id})
})
}