fix for use in engine / cli with no api.event

This commit is contained in:
Stewart Allen 2022-03-05 18:50:41 -05:00
commit 336ce53dd3

View file

@ -493,7 +493,10 @@ class Widget {
}
if (x || y || z) {
this.setModified();
api.event.emit('widget.move', {widget: this, pos});
// allow for use in engine / cli
if (api && api.event) {
api.event.emit('widget.move', {widget: this, pos});
}
}
}