Skip to content

Commit

Permalink
tinyfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanahiro committed Nov 20, 2024
1 parent db3225c commit c4d8353
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/maplibre/controls/CustomControl/Control.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
children?: Snippet;
}
let { position, control, children }: Props = $props();
if (!control && !children) throw new Error('You must provide either control or children.');
const mapCtx = getMapContext();
if (!mapCtx.map) throw new Error('Map instance is not initialized.');
if (!control && !children) throw new Error('You must provide either control or children.');
let el: HTMLDivElement | undefined = $state(undefined);
if (children) {
control = {
Expand Down

0 comments on commit c4d8353

Please sign in to comment.