修复 字符串空置

This commit is contained in:
Suwings 2022-01-24 17:03:47 +08:00
parent f9bfb8b437
commit 515ee751cb

View File

@ -162,7 +162,13 @@ export default class Instance extends EventEmitter {
else
self[key] = Number(v);
}
else if (typeFn) {
if (typeFn === String) {
if (v === null) {
self[key] = null;
} else {
self[key] = String(v);
}
} else if (typeFn) {
self[key] = typeFn(v);
} else {
self[key] = v;