fix removeMeta when meta prop is an object
parent
8eaa5c9326
commit
ef1f922c86
|
@ -3,9 +3,10 @@ import isObject from '../../util/isObject'
|
||||||
export default function removeMeta(obj: any): any {
|
export default function removeMeta(obj: any): any {
|
||||||
let result = {}
|
let result = {}
|
||||||
for (let key in obj) {
|
for (let key in obj) {
|
||||||
|
if (key.substr(0, 2) === '__') continue
|
||||||
if (isObject(obj[key])) {
|
if (isObject(obj[key])) {
|
||||||
result[key] = removeMeta(obj[key])
|
result[key] = removeMeta(obj[key])
|
||||||
} else if (key.substr(0, 2) !== '__') {
|
} else {
|
||||||
result[key] = obj[key]
|
result[key] = obj[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue