]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(reactivity): use warn (#5548)
authorCode_xxmyyds <74082622+xxmyyds@users.noreply.github.com>
Wed, 13 Apr 2022 09:21:38 +0000 (17:21 +0800)
committerGitHub <noreply@github.com>
Wed, 13 Apr 2022 09:21:38 +0000 (05:21 -0400)
packages/reactivity/src/baseHandlers.ts

index 8ad8e57171ffffae0c044ca57f6f433c2d99c535..aaec961381ef0db33077bb1daf6f47238707d301 100644 (file)
@@ -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`)
 
@@ -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
       )
@@ -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
       )