File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,12 @@ export default function find<M extends Model = Model>(options: UseFindOptions):
66
66
options
67
67
)
68
68
69
+ if ( ! model ) {
70
+ throw new Error (
71
+ `No model provided for useFind(). Did you define and register it with FeathersVuex?`
72
+ )
73
+ }
74
+
69
75
const getFetchParams = ( providedParams ?: Params | Ref < Params > ) : Params => {
70
76
const provided = unwrapParams ( providedParams )
71
77
Original file line number Diff line number Diff line change @@ -54,6 +54,12 @@ export default function get<M extends Model = Model>(options: UseGetOptions): Us
54
54
options
55
55
)
56
56
57
+ if ( ! model ) {
58
+ throw new Error (
59
+ `No model provided for useGet(). Did you define and register it with FeathersVuex?`
60
+ )
61
+ }
62
+
57
63
function getId ( ) : null | string | number {
58
64
return isRef ( id ) ? id . value : id || null
59
65
}
You can’t perform that action at this time.
0 commit comments