Skip to content

Commit

Permalink
refactor: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Apr 5, 2023
1 parent c448500 commit 75f3a47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/runtime-core/src/apiSetupHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import {
isPromise,
isFunction,
Prettify,
UnionToIntersection,
isObject
UnionToIntersection
} from '@vue/shared'
import {
getCurrentInstance,
Expand Down Expand Up @@ -326,7 +325,7 @@ export function useModel<T>(name: string): WritableComputedRef<T> {
}

const options = (i.propsOptions[0] as NormalizedProps)[name]
if (isObject(options) && !options.required) {
if (options && !options.required) {
const proxy = ref<any>(i.props[name])

watch(
Expand Down

0 comments on commit 75f3a47

Please sign in to comment.