Skip to content

Commit d2f6efa

Browse files
committed
check for null serviceWorker registration
1 parent 43bbe5d commit d2f6efa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

about.html

+2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ <h1>About</h1>
8484
if ("serviceWorker" in navigator) {
8585
navigator.serviceWorker.getRegistration().then(function(registration){
8686
if (registration) {
87+
if (registration.active) {
8788
document.getElementById("cachenamedisplay").innerHTML = "Service worker " + registration.active.state + " ";
89+
}
8890
}
8991
});
9092
};

0 commit comments

Comments
 (0)