fix(reactivity): explicitly do type conversions in warning strings (#129)

This commit is contained in:
月迷津渡
2019-10-06 23:26:33 +08:00
committed by Evan You
parent 3d975247cd
commit 5eacfaf210
2 changed files with 34 additions and 3 deletions

View File

@@ -107,7 +107,7 @@ export const readonlyHandlers: ProxyHandler<any> = {
if (LOCKED) {
if (__DEV__) {
console.warn(
`Set operation on key "${key as any}" failed: target is readonly.`,
`Set operation on key "${String(key)}" failed: target is readonly.`,
target
)
}
@@ -121,7 +121,9 @@ export const readonlyHandlers: ProxyHandler<any> = {
if (LOCKED) {
if (__DEV__) {
console.warn(
`Delete operation on key "${key as any}" failed: target is readonly.`,
`Delete operation on key "${String(
key
)}" failed: target is readonly.`,
target
)
}