refactor: simplify conditional
This commit is contained in:
parent
e151d34100
commit
55a2bc483c
@ -23,10 +23,8 @@ export function extractInitializers(
|
|||||||
const props = instance.$props
|
const props = instance.$props
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0; i < keys.length; i++) {
|
||||||
const key = keys[i]
|
const key = keys[i]
|
||||||
if (!isReservedKey(key)) {
|
if (!isReservedKey(key) && !props.hasOwnProperty(key)) {
|
||||||
if (!props.hasOwnProperty(key)) {
|
data[key] = (instance as any)[key]
|
||||||
data[key] = (instance as any)[key]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return data
|
return data
|
||||||
|
Loading…
Reference in New Issue
Block a user