Skip to content

Commit

Permalink
fix: null referance exception in mirror length
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Aug 22, 2022
1 parent 804b648 commit 3220ec0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/datalayer/persistance.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,11 @@ const _addMirror = async (storeId, url) => {
const mirrors = await getMirrors(storeId);

// Dont add the mirror if it already exists.
if (
mirrors.find(
(mirror) => mirror.launcher_id === storeId && mirror.urls.includes(url),
).length === 0
) {
const mirror = mirrors.find(
(mirror) => mirror.launcher_id === storeId && mirror.urls.includes(url),
);

if (mirror?.length === 0) {
return true;
}

Expand Down

0 comments on commit 3220ec0

Please sign in to comment.