Skip to content

Commit

Permalink
feat: change the return of the difference between two non-objects
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsalles committed May 30, 2021
1 parent b8795fb commit fac5468
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
4 changes: 0 additions & 4 deletions src/perform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
12 changes: 1 addition & 11 deletions test/perform.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,17 +393,7 @@ describe('perform', () => {
}
],
/* 16 */
[
{
type: 'change',
path: {
string: '',
chain: []
},
previous: 'value',
value: 'different value'
}
],
[],
/* 17 */
[
{
Expand Down

0 comments on commit fac5468

Please sign in to comment.