Fix code breaking on dev server

This commit is contained in:
RMidhunSuresh 2022-06-12 16:51:10 +05:30
parent acffd15002
commit b5fd3656a7

View file

@ -187,11 +187,13 @@ export class Platform {
this._serviceWorkerHandler, this._serviceWorkerHandler,
this._config.push this._config.push
); );
const manifests = this.config["themeManifests"]; if (this._themeLoader) {
await this._themeLoader?.init(manifests, log); const manifests = this.config["themeManifests"];
const { themeName, themeVariant } = await this._themeLoader.getActiveTheme(); await this._themeLoader?.init(manifests, log);
log.log({ l: "Active theme", name: themeName, variant: themeVariant }); const { themeName, themeVariant } = await this._themeLoader.getActiveTheme();
this._themeLoader?.setTheme(themeName, themeVariant, log); log.log({ l: "Active theme", name: themeName, variant: themeVariant });
this._themeLoader.setTheme(themeName, themeVariant, log);
}
}); });
} catch (err) { } catch (err) {
this._container.innerText = err.message; this._container.innerText = err.message;