Skip to content

Commit 781fa6c

Browse files
committed
update patching; add case where there is no beta
1 parent 40f137c commit 781fa6c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

patches/compute-baseline+0.3.1.patch renamed to patches/compute-baseline+0.4.0.patch

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
diff --git a/node_modules/compute-baseline/dist/browser-compat-data/browser.js b/node_modules/compute-baseline/dist/browser-compat-data/browser.js
2-
index 1e865af..fc37272 100644
2+
index 1e865af..6c4be7f 100644
33
--- a/node_modules/compute-baseline/dist/browser-compat-data/browser.js
44
+++ b/node_modules/compute-baseline/dist/browser-compat-data/browser.js
5-
@@ -36,7 +36,7 @@ export class Browser {
5+
@@ -36,7 +36,8 @@ export class Browser {
66
return this.data.name;
77
}
88
current() {
99
- const curr = this.releases.find((r) => r.data.status === "current");
10-
+ const curr = this.releases.findLast((r) => r.data.status === "beta");
10+
+ const curr = this.releases.findLast((r) => r.data.status === "beta") ||
11+
+ this.releases.find((r) => r.data.status === "current");
1112
if (curr === undefined) {
1213
throw new Error(`${browser} does not have a "current" release`);
1314
}

0 commit comments

Comments
 (0)