mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-27 18:54:44 +08:00
Various fixes
This commit is contained in:
38
js/entity/TypeInitialization.js
Normal file → Executable file
38
js/entity/TypeInitialization.js
Normal file → Executable file
@@ -1,19 +1,19 @@
|
||||
import Utility from "../Utility"
|
||||
|
||||
export default class TypeInitialization {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {typeof Object} type
|
||||
* @param {boolean} showDefault
|
||||
* @param {*} value
|
||||
*/
|
||||
constructor(type, showDefault = true, value = undefined) {
|
||||
if (value === undefined) {
|
||||
value = Utility.sanitize(new type())
|
||||
}
|
||||
this.value = value
|
||||
this.showDefault = showDefault
|
||||
this.type = type
|
||||
}
|
||||
}
|
||||
import Utility from "../Utility"
|
||||
|
||||
export default class TypeInitialization {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {typeof Object} type
|
||||
* @param {boolean} showDefault
|
||||
* @param {*} value
|
||||
*/
|
||||
constructor(type, showDefault = true, value = undefined) {
|
||||
if (value === undefined) {
|
||||
value = Utility.sanitize(new type())
|
||||
}
|
||||
this.value = value
|
||||
this.showDefault = showDefault
|
||||
this.type = type
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user