Skip to content

Commit

Permalink
fix(recovery): 🚨 linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
whizzzkid committed Feb 22, 2023
1 parent 91a9567 commit 74cb934
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions add-on/src/lib/ipfs-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,10 @@ export function createRequestModifier (getState, dnslinkResolver, ipfsPathValida

// When local IPFS node is unreachable , show recovery page where user can redirect
// to public gateway.
if (!state.nodeActive && // node is not active
!state.redirect && // this is not a redirect request
request.type === 'main_frame' && // this is a request for a root document
sameGateway(request.url, state.gwURL) // this is a request to the local gateway
if (!state.nodeActive && // node is not active
!state.redirect && // this is not a redirect request
request.type === 'main_frame' && // this is a request for a root document
sameGateway(request.url, state.gwURL) // this is a request to the local gateway
) {
const publicUri = ipfsPathValidator.resolveToPublicUrl(request.url, state.pubGwURLString)
return { redirectUrl: `${dropSlash(runtimeRoot)}${recoveryPagePath}#${encodeURIComponent(publicUri)}` }
Expand Down

0 comments on commit 74cb934

Please sign in to comment.