From 7703b627a0748bf49b30755a8c5fad667506f12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Thu, 11 Jul 2024 15:03:54 +0200 Subject: [PATCH] Don't write a spec draft with an empty compat_features array --- scripts/update-drafts.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/update-drafts.ts b/scripts/update-drafts.ts index 8908700ce20..a7e3d6b384b 100644 --- a/scripts/update-drafts.ts +++ b/scripts/update-drafts.ts @@ -88,8 +88,8 @@ async function main() { } } + // Separate out features that are already part of web-features. for (const [spec, compatFeatures] of specToCompatFeatures.entries()) { - // Separate out features that are already part of web-features. const usedFeatures = new Map>(); for (const key of compatFeatures) { if (webFeatures.has(key)) { @@ -103,6 +103,11 @@ async function main() { } } + // If all features are already part of web-features, skip this spec. + if (compatFeatures.size === 0) { + continue; + } + // Write out draft feature per spec. const id = formatIdentifier(spec.shortname);