@@ -7,11 +7,9 @@ import decode from 'jwt-decode'
7
7
import inflection from 'inflection'
8
8
import Vue from 'vue'
9
9
import fastCopy from 'fast-copy'
10
- import _isPlainObject from 'lodash/isPlainObject'
11
10
import _isObject from 'lodash/isObject'
12
11
import _trim from 'lodash/trim'
13
12
import _omit from 'lodash/omit'
14
- import _get from 'lodash/get'
15
13
import ObjectID from 'bson-objectid'
16
14
import { globalModels as models } from './service-module/global-models'
17
15
import stringify from 'fast-json-stable-stringify'
@@ -450,7 +448,6 @@ export function mergeWithAccessors(
450
448
// Do not use fastCopy directly on a feathers-vuex BaseModel instance to keep from breaking reactivity.
451
449
if ( isObject && ! isFeathersVuexInstance ) {
452
450
try {
453
- const sourceObject = source [ key ]
454
451
dest [ key ] = fastCopy ( source [ key ] )
455
452
} catch ( err ) {
456
453
if ( ! err . message . includes ( 'getter' ) ) {
@@ -486,8 +483,9 @@ export function mergeWithAccessors(
486
483
// Assign values
487
484
// Do not allow sharing of deeply-nested objects between instances
488
485
// Potentially breaks accessors on nested data. Needs recursion if this is an issue
486
+ let value
489
487
if ( _isObject ( sourceDesc . value ) && ! isBaseModelInstance ( sourceDesc . value ) ) {
490
- var value = fastCopy ( sourceDesc . value )
488
+ value = fastCopy ( sourceDesc . value )
491
489
}
492
490
dest [ key ] = value || sourceDesc . value
493
491
} )
0 commit comments