fix(runtime-core): fix component public instance has check for accessed non-existent properties
close #4962
This commit is contained in:
@@ -195,6 +195,11 @@ describe('component: proxy', () => {
|
||||
expect('$foobar' in instanceProxy).toBe(false)
|
||||
expect('baz' in instanceProxy).toBe(false)
|
||||
|
||||
// #4962 triggering getter should not cause non-existent property to
|
||||
// pass the has check
|
||||
instanceProxy.baz
|
||||
expect('baz' in instanceProxy).toBe(false)
|
||||
|
||||
// set non-existent (goes into proxyTarget sink)
|
||||
instanceProxy.baz = 1
|
||||
expect('baz' in instanceProxy).toBe(true)
|
||||
|
||||
Reference in New Issue
Block a user