Skip to content

Commit b8bb433

Browse files
committed
fix checks for Model instance.isFeathersVuexInstance
1 parent fcf6963 commit b8bb433

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@ export default function makeServiceActions(service: Service<any>) {
318318

319319
const isIdOk = id !== null && id !== undefined
320320

321-
if (service.FeathersVuexModel && !item.isFeathersVuexInstance) {
321+
if (
322+
service.FeathersVuexModel &&
323+
!(item instanceof service.FeathersVuexModel)
324+
) {
322325
item = new service.FeathersVuexModel(item)
323326
}
324327

src/service-module/service-module.mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default function makeServiceMutations() {
7171
if (state.ids.includes(id)) {
7272
// Completely replace the item
7373
if (replaceItems) {
74-
if (Model && !item.isFeathersVuexInstance) {
74+
if (Model && !(item instanceof Model)) {
7575
item = new Model(item)
7676
}
7777
Vue.set(state.keyedById, id, item)

0 commit comments

Comments
 (0)