Skip to content

Commit 0b1adb5

Browse files
committed
Fix #1054
1 parent a627020 commit 0b1adb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

views/service-worker.js.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ self.addEventListener('fetch', event => {
5050
<%# The index page will make sure the correct documentation or a proper offline page is shown %>
5151
const pathname = url.pathname;
5252
const filename = pathname.substr(1 + pathname.lastIndexOf('/')).split(/\#|\?/g)[0];
53-
if (url.origin === location.origin && !filename.includes('.')) {
53+
if (url.origin === location.origin && !['.css', '.js', '.json', '.png', '.ico', '.svg', '.xml'].some(ext => filename.endsWith(ext))) {
5454
const cachedIndex = await caches.match('/');
5555
if (cachedIndex) return cachedIndex;
5656
}

0 commit comments

Comments
 (0)