Skip to content

Commit 001e757

Browse files
author
Priya
committed
fix(components): handle missing _supporters.json with fallback
1 parent 800eb36 commit 001e757

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/Support/Support.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ import SmallIcon from "../../assets/icon-square-small-slack.png";
77
import Tooltip from "../Tooltip/Tooltip.jsx";
88
import Additional from "./AdditionalSupporters.mjs";
99
/* eslint import/no-unresolved: ["error", { ignore: ["_supporters\.json$"] }] */
10-
import Backers from "./_supporters.json";
10+
let supporters = [];
1111

12-
const SUPPORTERS = [...Backers];
12+
try {
13+
supporters = require("./_supporters.json");
14+
} catch (error) {
15+
console.warn("_supporters.json not found, using empty list");
16+
}
17+
18+
const SUPPORTERS = [...supporters];
1319

1420
// Merge or add additional backers/sponsors
1521
for (const additional of Additional) {

0 commit comments

Comments
 (0)