Sort card data by keys for consistent diffs

This commit is contained in:
Adam Goldsmith 2021-09-08 21:31:38 -04:00
parent 2e498dab9b
commit a0f66b935a

View File

@ -177,7 +177,16 @@ function build_card(component) {
// 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 = [];