Skip to content

Commit f00445e

Browse files
committed
fixes window drop
1 parent d4fa9c7 commit f00445e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/lib/components/FileDrop/FileDrop.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
multiple,
3232
};
3333
}
34-
$: isMulti = (fileLimit === undefined || fileLimit > 1) && (multiple === undefined || multiple);
3534
const dispatch = createEventDispatcher<Events>();
3635
3736
function proxy<T extends keyof Events, E extends CustomEvent<Events[T]> = CustomEvent<Events[T]>>(
@@ -42,6 +41,8 @@
4241
dispatch(type, ev.detail);
4342
};
4443
}
44+
45+
$: isMulti = (fileLimit === undefined || fileLimit > 1) && (multiple === undefined || multiple);
4546
</script>
4647

4748
<div

src/lib/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export function isString(value: unknown): value is string {
1313
return typeof value === "string";
1414
}
1515
export function isBrowser(): boolean {
16-
return typeof window == "undefined";
16+
return typeof window !== "undefined";
1717
}

0 commit comments

Comments
 (0)