From fac5468c0ae9a82322762de5e5450e4ec1b35e78 Mon Sep 17 00:00:00 2001 From: Max Salles Date: Sun, 30 May 2021 12:09:12 -0300 Subject: [PATCH] feat: change the return of the difference between two non-objects --- src/perform.js | 4 ---- test/perform.spec.js | 12 +----------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/perform.js b/src/perform.js index afca33c..7e6a194 100644 --- a/src/perform.js +++ b/src/perform.js @@ -5,10 +5,6 @@ import getProperties from './getProperties' import heap from './heap' export default function perform (originalWrapped, derivedWrapped) { - if (originalWrapped.type !== 'object' && derivedWrapped.type !== 'object') { - return [getChange(originalWrapped, derivedWrapped)] - } - const properties = getProperties(originalWrapped.value, derivedWrapped.value) return properties.reduce((result, property) => { diff --git a/test/perform.spec.js b/test/perform.spec.js index e76695d..dc2612c 100644 --- a/test/perform.spec.js +++ b/test/perform.spec.js @@ -393,17 +393,7 @@ describe('perform', () => { } ], /* 16 */ - [ - { - type: 'change', - path: { - string: '', - chain: [] - }, - previous: 'value', - value: 'different value' - } - ], + [], /* 17 */ [ {