Skip to content

Commit 711c826

Browse files
authored
chore(reactivity): use warn (#5548)
1 parent 2c09969 commit 711c826

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/reactivity/src/baseHandlers.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
makeMap
3131
} from '@vue/shared'
3232
import { isRef } from './ref'
33+
import { warn } from './warning'
3334

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

@@ -218,7 +219,7 @@ export const readonlyHandlers: ProxyHandler<object> = {
218219
get: readonlyGet,
219220
set(target, key) {
220221
if (__DEV__) {
221-
console.warn(
222+
warn(
222223
`Set operation on key "${String(key)}" failed: target is readonly.`,
223224
target
224225
)
@@ -227,7 +228,7 @@ export const readonlyHandlers: ProxyHandler<object> = {
227228
},
228229
deleteProperty(target, key) {
229230
if (__DEV__) {
230-
console.warn(
231+
warn(
231232
`Delete operation on key "${String(key)}" failed: target is readonly.`,
232233
target
233234
)

0 commit comments

Comments
 (0)