Skip to content

Commit 4ae03ba

Browse files
Merge pull request #586 from dallinbjohnson/makeServiceActions-options-args
Make service actions options args
2 parents 037d58b + 40b9cb1 commit 4ae03ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/service-module/service-module.actions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ export default function makeServiceActions({service, options}: serviceAndOptions
173173

174174
params = fastCopy(params)
175175

176-
if (service.FeathersVuexModel && (!params || !params.data)) {
177-
data = service.FeathersVuexModel.diffOnPatch(data)
176+
if (options.Model && (!params || !params.data)) {
177+
data = options.Model.diffOnPatch(data)
178178
}
179179
if (params && params.data) {
180180
data = params.data
@@ -354,10 +354,10 @@ export default function makeServiceActions({service, options}: serviceAndOptions
354354
const isIdOk = id !== null && id !== undefined
355355

356356
if (
357-
service.FeathersVuexModel &&
358-
!(item instanceof service.FeathersVuexModel)
357+
options.Model &&
358+
!(item instanceof options.Model)
359359
) {
360-
item = new service.FeathersVuexModel(item, { commit: false })
360+
item = new options.Model(item, { commit: false })
361361
}
362362

363363
if (isIdOk) {

0 commit comments

Comments
 (0)