feat: clean object before showing changes
This commit is contained in:
parent
b5cafef408
commit
f9614b55fb
1 changed files with 15 additions and 2 deletions
|
@ -677,12 +677,25 @@ export default {
|
||||||
|
|
||||||
openDiffModal () {
|
openDiffModal () {
|
||||||
this.diffModal = true
|
this.diffModal = true
|
||||||
|
const clean = unordered => {
|
||||||
|
// Object.keys(unordered).sort().forEach(key => {
|
||||||
|
// ordered[key] = unordered[key]
|
||||||
|
// })
|
||||||
|
return {
|
||||||
|
name: unordered.name,
|
||||||
|
descriptionShort: unordered.descriptionShort,
|
||||||
|
descriptionLong: unordered.descriptionLong,
|
||||||
|
thumbnail: unordered.thumbnail,
|
||||||
|
contacts: unordered.contacts,
|
||||||
|
...unordered
|
||||||
|
}
|
||||||
|
}
|
||||||
this.diffText = diff(
|
this.diffText = diff(
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
this.toApproveItem.publishedVersion, '', 2
|
clean(this.toApproveItem.publishedVersion), '', 2
|
||||||
),
|
),
|
||||||
JSON.stringify(
|
JSON.stringify(
|
||||||
this.toApproveItem.proposedVersion, '', 2
|
clean(this.toApproveItem.proposedVersion), '', 2
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
green: (v) => '<GREEN>' + v + '</GREEN>',
|
green: (v) => '<GREEN>' + v + '</GREEN>',
|
||||||
|
|
Loading…
Reference in a new issue