]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/utils.ts
Fix loading indicator on search page (fixes #443) (#606)
[lemmy-ui.git] / src / shared / utils.ts
index 2278256be24d7c7008d3d8b423d838046f3bad61..df26970d13edca89f4c39e69cd901c5ba473e916 100644 (file)
@@ -380,7 +380,7 @@ export async function setTheme(theme: string, forceReload = false) {
   document.getElementById("default-dark")?.setAttribute("disabled", "disabled");
 
   // Load the theme dynamically
-  let cssLoc = `/css/themes/${theme}.min.css`;
+  let cssLoc = `/css/themes/${theme}.css`;
 
   loadCss(theme, cssLoc);
   document.getElementById(theme).removeAttribute("disabled");
@@ -1335,3 +1335,9 @@ export function isBanned(ps: PersonSafe): boolean {
     return ps.banned;
   }
 }
+
+export function pushNotNull(array: any[], new_item?: any) {
+  if (new_item) {
+    array.push(...new_item);
+  }
+}