all: catch some undef errors

This commit is contained in:
jean-emmanuel 2025-09-17 09:19:11 +02:00
parent 4dbc572ea1
commit f5091b9267
6 changed files with 9 additions and 8 deletions

View file

@ -509,7 +509,8 @@ class ScriptVm extends Vm {
this.checkContext('runAs')
var widgets = this.resolveId(id)
var widgets = this.resolveId(id),
widget = this.getWidget()
if (widgets.length) {
@ -529,10 +530,10 @@ class ScriptVm extends Vm {
this.checkContext('reload')
var options = this.getValueOptions()
var options = this.getValueOptions(),
widget = this.getWidget()
if (options.onCreate) {
var widget = this.getWidget()
widget.errorProp('onCreate', '', 'reload() cannot be called from onCreate')
} else if (options.send){
if (keepState) ipc.trigger('reload')