widget: ignore invalid properties (avoid recreating if matrix/clone child has an override for an invalid property)

This commit is contained in:
jean-emmanuel 2025-05-07 09:42:12 +02:00
parent 6c2e500135
commit c860bc1959
2 changed files with 7 additions and 1 deletions

View file

@ -939,7 +939,12 @@ class Widget extends EventEmitter {
if (!this.isDynamicProp(propName)) {
if (widget && this.contains(widget)) {
if (this.constructor._defaults[propName] === undefined) {
// ignore invalid properties
continue
} else if (widget && this.contains(widget)) {
this.errorProp(propName, '@{}', `a container can't use its child's properties to define non-dynamic properties.`)
continue

View file

@ -69,5 +69,6 @@ module.exports.categories = {
var defaults = {}
for (var k in module.exports.widgets) {
defaults[k] = module.exports.widgets[k].defaults()
module.exports.widgets[k]._defaults = defaults
}
module.exports.defaults = defaults