Skip to content

Commit

Permalink
Update helpers.js
Browse files Browse the repository at this point in the history
  • Loading branch information
auniverseaway authored Aug 8, 2024
1 parent fab60e7 commit 6a0d917
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/edit/da-library/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function getAemPlugins(owner, repo, ref = 'main') {
const resp = await daFetch(`https://admin.hlx.page/sidekick/${owner}/${repo}/${ref}/config.json`);
if (!resp.ok) return [];
const json = await resp.json();
if (!json && !json.plugins) return [];
if (!json || !json.plugins) return [];
if (json?.plugins?.length === 0) return [];
return json.plugins.reduce((acc, plugin) => {
if (plugin.daLibrary) acc.push({ name: plugin.title, url: plugin.url });
Expand Down

0 comments on commit 6a0d917

Please sign in to comment.