Bug 1865275 - [devtools] Fix MDN compat data update script. r=devtools-reviewers,bomsy.

Differential Revision: https://phabricator.services.mozilla.com/D193876
This commit is contained in:
Nicolas Chevobbe 2023-11-17 15:31:10 +00:00
parent ba92d46a42
commit 4a2938e1e4

View File

@ -144,9 +144,13 @@ function removeUnusedData(compatNode) {
const compatTable = getCompatTable(compatNode, [term]);
// A term may only have a `_aliasOf` property (e.g. for word-wrap), so we don't have
// compat data in it directly.
if (compatTable) {
// source_file references the name of the file in the MDN compat data repo where the
// property is handled. We don't make use of it so we can remove it.
delete compatTable.source_file;
// Not used at the moment. Doesn't seem to have much information anyway
delete compatTable.description;
@ -171,6 +175,7 @@ function removeUnusedData(compatNode) {
}
}
}
}
// Handle deeper node as well.
removeUnusedData(compatNode[term]);