Skip to content

Commit

Permalink
fix(offline-provider): avoid side-effects if PWA is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Oct 20, 2021
1 parent 0fabe6c commit eb54aaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/offline/src/lib/offline-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function OfflineProvider({
}: OfflineProviderInput): JSX.Element {
// If an offline interface is not provided, or if one is provided and PWA
// is not enabled, skip adding context providers
if (!offlineInterface) {
if (!offlineInterface || !offlineInterface.pwaEnabled) {
return <>{children}</>
}

Expand Down

0 comments on commit eb54aaf

Please sign in to comment.