refactor(utils): use built-in throwError function (#3916)

This commit is contained in:
波比小金刚
2021-10-18 16:30:45 +08:00
committed by GitHub
parent 06fc7f4215
commit fdfe38deb0

View File

@@ -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
}