sforkowany z mirror/soapbox
sw.js: fix match against undefined pathname
rodzic
bb1275e51a
commit
c356597523
|
@ -104,7 +104,11 @@ module.exports = merge(sharedConfig, {
|
|||
];
|
||||
|
||||
const isBackendRoute = ({ pathname }) => {
|
||||
return backendRoutes.some(pathname.startsWith);
|
||||
if (pathname) {
|
||||
return backendRoutes.some(pathname.startsWith);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
return isBackendRoute(requestUrl) && requestUrl;
|
||||
|
|
Ładowanie…
Reference in New Issue