Skip to content

Commit

Permalink
chore: update core deps
Browse files Browse the repository at this point in the history
- Update `@vue/reactivity` from 3.2.27 to 3.4.0
  - Avoid circular referencing the `hasOwnProperty` method in reactive proxy.
  - Reference: [fix(reactivity): track hasOwnProperty](vuejs/core@588bd44)
- Bump `@vue/shared` from 3.2.7 to 3.4.0
  • Loading branch information
nick-lai committed Dec 29, 2023
1 parent bc7df16 commit d9c77ae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
},
"homepage": "https://github.com/vuejs/petite-vue#readme",
"devDependencies": {
"@vue/reactivity": "^3.2.27",
"@vue/shared": "^3.2.27",
"@vue/reactivity": "^3.4.0",
"@vue/shared": "^3.4.0",
"chalk": "^4.1.1",
"conventional-changelog-cli": "^2.1.1",
"enquirer": "^2.3.6",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
reactive,
ReactiveEffectRunner
} from '@vue/reactivity'
import { hasOwn } from '@vue/shared'
import { Block } from './block'
import { Directive } from './directives'
import { queueJob } from './scheduler'
Expand Down Expand Up @@ -54,7 +55,7 @@ export const createScopedContext = (ctx: Context, data = {}): Context => {
set(target, key, val, receiver) {
// when setting a property that doesn't exist on current scope,
// do not create it on the current scope and fallback to parent scope.
if (receiver === reactiveProxy && !target.hasOwnProperty(key)) {
if (receiver === reactiveProxy && !hasOwn(target, key)) {
return Reflect.set(parentScope, key, val)
}
return Reflect.set(target, key, val, receiver)
Expand Down

0 comments on commit d9c77ae

Please sign in to comment.