fix removeMeta when meta prop is an object

master
Brad Cornes 2020-05-10 12:06:49 +01:00
parent 8eaa5c9326
commit ef1f922c86
1 changed files with 2 additions and 1 deletions

View File

@ -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]
} }
} }