From fdfe38deb0feac7b8eeb33037f7ebd012c6a5fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B3=A2=E6=AF=94=E5=B0=8F=E9=87=91=E5=88=9A?= <2890636389@qq.com> Date: Mon, 18 Oct 2021 16:30:45 +0800 Subject: [PATCH] refactor(utils): use built-in throwError function (#3916) --- packages/utils/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/utils/util.ts b/packages/utils/util.ts index d54dcef94c..a08acbb9fe 100644 --- a/packages/utils/util.ts +++ b/packages/utils/util.ts @@ -14,7 +14,7 @@ import { } from '@vue/shared' import isEqualWith from 'lodash/isEqualWith' import isServer from './isServer' -import { debugWarn } from './error' +import { debugWarn, throwError } from './error' import type { ComponentPublicInstance, CSSProperties, Ref } from 'vue' import type { TimeoutHandle, Nullable } from './types' @@ -68,7 +68,7 @@ export function getPropByPath( tempObj = tempObj[key] } else { if (strict) { - throw new Error('Please transfer a valid prop path to form item!') + throwError(SCOPE, 'Please transfer a valid prop path to form item!') } break }