{#each options as option}
- button_pressed("on_select" in option ? option.on_select : null) : undefined}/>
+ button_pressed("on_select" in option ? option.on_select : () => {}) : undefined}/>
{/each}
diff --git a/src/lib/context_menu/ContextMenuButton.svelte b/src/lib/context_menu/ContextMenuButton.svelte
index 661b310..c7f200c 100644
--- a/src/lib/context_menu/ContextMenuButton.svelte
+++ b/src/lib/context_menu/ContextMenuButton.svelte
@@ -6,7 +6,7 @@
export let og_y: number;
export let name: string;
- export let options: ContextMenuOption[];
+ export let options: ContextMenuOption[] | null;
let submenu_visible = false;
function onmouseenter() {
diff --git a/src/lib/map/field.ts b/src/lib/map/field.ts
index a592d2e..9fc0389 100644
--- a/src/lib/map/field.ts
+++ b/src/lib/map/field.ts
@@ -89,8 +89,8 @@ export function update_field(input: Input) {
last_mouse_y = input.mouse_y;
}
-let game_type_value = undefined;
-let is_skills_value = undefined;
+let game_type_value: GameType | undefined = undefined;
+let is_skills_value: boolean | undefined = undefined;
game_type.subscribe(v => game_type_value = v);
is_skills.subscribe(v => is_skills_value = v);
@@ -101,10 +101,10 @@ export let game: Promise