Skip to content

Commit

Permalink
chore(reactivity): use warn (#5548)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxmyyds committed Apr 13, 2022
1 parent 2c09969 commit 711c826
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/reactivity/src/baseHandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
makeMap
} from '@vue/shared'
import { isRef } from './ref'
import { warn } from './warning'

const isNonTrackableKeys = /*#__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`)

Expand Down Expand Up @@ -218,7 +219,7 @@ export const readonlyHandlers: ProxyHandler<object> = {
get: readonlyGet,
set(target, key) {
if (__DEV__) {
console.warn(
warn(
`Set operation on key "${String(key)}" failed: target is readonly.`,
target
)
Expand All @@ -227,7 +228,7 @@ export const readonlyHandlers: ProxyHandler<object> = {
},
deleteProperty(target, key) {
if (__DEV__) {
console.warn(
warn(
`Delete operation on key "${String(key)}" failed: target is readonly.`,
target
)
Expand Down

0 comments on commit 711c826

Please sign in to comment.