mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-18 00:33:57 +00:00
fix: use correct condition
This commit is contained in:
@@ -14,10 +14,7 @@
|
||||
let isTopModal = $derived(modalsStack.isTopModal(id));
|
||||
|
||||
$effect(() => {
|
||||
if (open)
|
||||
modalsStack.push(id, () => {
|
||||
open = false;
|
||||
});
|
||||
if (open) modalsStack.push(id, () => (open = false));
|
||||
else modalsStack.pop(id);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -20,7 +20,7 @@ class ModalStack {
|
||||
}
|
||||
|
||||
closeTop() {
|
||||
if (this.stack.length < 0) return;
|
||||
if (this.stack.length <= 0) return;
|
||||
const topId = this.stack[this.stack.length - 1];
|
||||
this.modals.get(topId)?.();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user