@dotglitch/ngx-common 1.0.36 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1940,11 +1940,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1940
1940
  }]
1941
1941
  }], ctorParameters: function () { return [{ type: Fetch }]; } });
1942
1942
 
1943
- const isLightMode = document.body.classList.contains("light");
1944
1943
  class ThemeService extends BehaviorSubject {
1945
1944
  constructor() {
1946
- super(isLightMode ? "light" : "dark");
1945
+ super(document.body.classList.contains("light") ? "light" : "dark");
1947
1946
  this.subscribe(t => {
1947
+ if (!t || t == 'undefined')
1948
+ return;
1948
1949
  if (document.body.classList.contains("dark") && t == "light")
1949
1950
  document.body.classList.remove("dark");
1950
1951
  if (document.body.classList.contains("light") && t == "dark")