Skip to content

Commit

Permalink
Merge pull request #47 from VortexExpansion/safari-error-fix
Browse files Browse the repository at this point in the history
fix array reduce for strict browser
  • Loading branch information
VortexExpansion authored Nov 6, 2024
2 parents 96ab151 + 96e1dd3 commit 9f13468
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/section/article/Article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export default function Article({ children }) {
setContent(contentDirectory.article);
}

// changes the searchParams object to a plain object
const params = searchParams
.entries()
.reduce((prev, [key, value]) => ({ ...prev, [key]: value }), {});
const params = Array.from(searchParams.entries()).reduce(
(prev, [key, value]) => ({ ...prev, [key]: value }),
{},
);
setParams(params);

async function fetchTagName(categoryid, id) {
Expand Down

0 comments on commit 9f13468

Please sign in to comment.