mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-15 17:54:52 +08:00
Type initialization using objects
This commit is contained in:
@@ -3,12 +3,16 @@ import IEntity from "./IEntity"
|
||||
export default class ObjectReferenceEntity extends IEntity {
|
||||
|
||||
static attributes = {
|
||||
type: String,
|
||||
path: String,
|
||||
type: "",
|
||||
path: "",
|
||||
}
|
||||
|
||||
static {
|
||||
this.cleanupAttributes(this.attributes)
|
||||
}
|
||||
|
||||
constructor(values = {}) {
|
||||
if (values.constructor !== Object) {
|
||||
if (values.constructor === String) {
|
||||
values = {
|
||||
path: values
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user