Sort card data by keys for consistent diffs
This commit is contained in:
parent
2e498dab9b
commit
a0f66b935a
@ -177,7 +177,16 @@ function build_card(component) {
|
|||||||
|
|
||||||
// TODO: parse out some keywords into their own fields
|
// TODO: parse out some keywords into their own fields
|
||||||
|
|
||||||
return card_data;
|
// order by keys
|
||||||
|
const ordered_card_data = Object.keys(card_data).sort().reduce(
|
||||||
|
function(obj, key) {
|
||||||
|
obj[key] = card_data[key];
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
|
||||||
|
return ordered_card_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
var cards = [];
|
var cards = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user