mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Fixes and Utility test added
This commit is contained in:
@@ -121,9 +121,15 @@ export default class IEntity {
|
||||
return this["#" + attributeName]
|
||||
},
|
||||
set(v) {
|
||||
if (attribute.predicate(v)) {
|
||||
this["#" + attributeName] = v
|
||||
if (!attribute.predicate?.(v)) {
|
||||
console.warn(
|
||||
`UEBlueprint: Tried to assign attribute ${prefix}${attributeName} to `
|
||||
+ `${this.constructor.name} not satisfying the predicate`
|
||||
|
||||
)
|
||||
return
|
||||
}
|
||||
this["#" + attributeName] = v
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user