Fix build
This commit is contained in:
parent
ea1e7e62ef
commit
3a2a8eed9e
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
|||
import {Utils} from "../Utils";
|
||||
|
||||
export default class Constants {
|
||||
|
||||
public static vNumber = "0.20.0";
|
||||
|
@ -70,6 +72,9 @@ export default class Constants {
|
|||
static countryCoderEndpoint: string = "https://raw.githubusercontent.com/pietervdvn/MapComplete-data/main/latlon2country";
|
||||
|
||||
private static isRetina(): boolean {
|
||||
if(Utils.runningFromConsole){
|
||||
return false;
|
||||
}
|
||||
// The cause for this line of code: https://github.com/pietervdvn/MapComplete/issues/115
|
||||
// See https://stackoverflow.com/questions/19689715/what-is-the-best-way-to-detect-retina-support-on-a-device-using-javascript
|
||||
return ((window.matchMedia && (window.matchMedia('only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx), only screen and (min-resolution: 75.6dpcm)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min--moz-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)').matches)) || (window.devicePixelRatio && window.devicePixelRatio >= 2));
|
||||
|
|
|
@ -28,7 +28,9 @@ async function activate() {
|
|||
title: "Some action"
|
||||
}]
|
||||
})*/
|
||||
|
||||
caches.keys().then(keys => {
|
||||
// Remove all old caches
|
||||
Promise.all(
|
||||
keys.map(key => key !== version && caches.delete(key))
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue