Skip to content

Build your personal knowledge base with Trilium Notes

chore(client): fix typecheck

Elian Doran1f1a79c64d7d
diff --git a/apps/client/src/widgets/collections/geomap/index.tsx b/apps/client/src/widgets/collections/geomap/index.tsx
index 9f539d97f8..c7fd20a46e 100644
--- a/apps/client/src/widgets/collections/geomap/index.tsx
+++ b/apps/client/src/widgets/collections/geomap/index.tsx
@@ -502,7 +502,7 @@ function useLayerData(note: FNote) {
if ("styleDark" in layerData) {
return {
...layerData,
- style: isSystemDark ? layerData.styleDark : layerData.styleLight,
+ style: isSystemDark ? (layerData.styleDark ?? layerData.style) : layerData.style,
isDarkTheme: isSystemDark
} satisfies MapLayer;
}
diff --git a/apps/client/src/widgets/collections/geomap/map_layer.ts b/apps/client/src/widgets/collections/geomap/map_layer.ts
index 5de11027af..0581c920e2 100644
--- a/apps/client/src/widgets/collections/geomap/map_layer.ts
+++ b/apps/client/src/widgets/collections/geomap/map_layer.ts
@@ -9,10 +9,10 @@ export type MapLayer = ({
* had on the day it was taken.
*/
style: string;
-} | {
- type: "vector",
- styleLight: string;
- styleDark: string;
+ /**
+ * If present, makes the theme light/dark mode aware.
+ */
+ styleDark?: string;
} | {
type: "raster";
url: string;
@@ -55,7 +55,7 @@ export const MAP_LAYERS: Record<string, MapLayer> = {
"versatile-colorful-eclipse": {
name: "VersaTiles Colorful/Eclipse",
type: "vector",
- styleLight: versatilesStyle("colorful"),
+ style: versatilesStyle("colorful"),
styleDark: versatilesStyle("eclipse")
},
"versatiles-graybeard": {
@@ -72,7 +72,7 @@ export const MAP_LAYERS: Record<string, MapLayer> = {
"versatile-graybeard-shadow": {
name: "VersaTiles Graybeard/Shadow",
type: "vector",
- styleLight: versatilesStyle("graybeard"),
+ style: versatilesStyle("graybeard"),
styleDark: versatilesStyle("shadow")
},
"versatiles-neutrino": {