Guard icon db check on hassio (#10181)
This commit is contained in:
parent
d5ca7e1719
commit
8022bd2868
|
@ -29,6 +29,7 @@
|
|||
"__BUILD__": false,
|
||||
"__VERSION__": false,
|
||||
"__STATIC_PATH__": false,
|
||||
"__SUPERVISOR__": false,
|
||||
"Polymer": true
|
||||
},
|
||||
"env": {
|
||||
|
|
|
@ -35,6 +35,7 @@ module.exports.definedVars = ({ isProdBuild, latestBuild, defineOverlay }) => ({
|
|||
__BUILD__: JSON.stringify(latestBuild ? "latest" : "es5"),
|
||||
__VERSION__: JSON.stringify(env.version()),
|
||||
__DEMO__: false,
|
||||
__SUPERVISOR__: false,
|
||||
__BACKWARDS_COMPAT__: false,
|
||||
__STATIC_PATH__: "/static/",
|
||||
"process.env.NODE_ENV": JSON.stringify(
|
||||
|
@ -194,6 +195,9 @@ module.exports.config = {
|
|||
publicPath: publicPath(latestBuild, paths.hassio_publicPath),
|
||||
isProdBuild,
|
||||
latestBuild,
|
||||
defineOverlay: {
|
||||
__SUPERVISOR__: true,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
|
|
|
@ -361,7 +361,10 @@ const mdiDeprecatedIcons: DeprecatedIcon = {
|
|||
|
||||
const chunks: Chunks = {};
|
||||
|
||||
checkCacheVersion();
|
||||
// Supervisor doesn't use icons, and should not update/downgrade the icon DB.
|
||||
if (!__SUPERVISOR__) {
|
||||
checkCacheVersion();
|
||||
}
|
||||
|
||||
const debouncedWriteCache = debounce(() => writeCache(chunks), 2000);
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ declare global {
|
|||
var __VERSION__: string;
|
||||
var __STATIC_PATH__: string;
|
||||
var __BACKWARDS_COMPAT__: boolean;
|
||||
var __SUPERVISOR__: boolean;
|
||||
/* eslint-enable no-var, no-redeclare */
|
||||
|
||||
interface Window {
|
||||
|
|
Loading…
Reference in New Issue