fix(core): update
This commit is contained in:
		@@ -10,6 +10,7 @@ tap.test('should create a smartobject', async () => {
 | 
				
			|||||||
      yeah: 'so deep',
 | 
					      yeah: 'so deep',
 | 
				
			||||||
      evendeeper: {
 | 
					      evendeeper: {
 | 
				
			||||||
        sodeep: 2,
 | 
					        sodeep: 2,
 | 
				
			||||||
 | 
					        deepArray: ['one array', 'two array']
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ export const toFlatObject = (objectArg: object) => {
 | 
				
			|||||||
    if (subObject)
 | 
					    if (subObject)
 | 
				
			||||||
      for (const key of Object.keys(subObject)) {
 | 
					      for (const key of Object.keys(subObject)) {
 | 
				
			||||||
        let localPathArg = pathArg;
 | 
					        let localPathArg = pathArg;
 | 
				
			||||||
        if (typeof subObject[ key ] === 'object') {
 | 
					        if (typeof subObject[ key ] === 'object' && !(subObject[ key ] instanceof Array)) {
 | 
				
			||||||
          const newLoopbackArray = loopProtection.slice();
 | 
					          const newLoopbackArray = loopProtection.slice();
 | 
				
			||||||
          newLoopbackArray.push(subObject);
 | 
					          newLoopbackArray.push(subObject);
 | 
				
			||||||
          extractLayer(subObject[ key ], localPathArg ? localPathArg += `.${key}` : key, newLoopbackArray);
 | 
					          extractLayer(subObject[ key ], localPathArg ? localPathArg += `.${key}` : key, newLoopbackArray);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user