Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
fix: removed nullish chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
TheComputerM committed Sep 9, 2020
1 parent 756b418 commit b0fd864
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
onMount(() => {
windowItems = Array.from(container.querySelectorAll('.s-window-item'));
windowItems[value]?.classList.add(activeClass);
const activeItem = windowItems[value];
if (activeItem) activeItem.classList.add(activeClass);
});
</script>

Expand Down

1 comment on commit b0fd864

@vercel
Copy link

@vercel vercel bot commented on b0fd864 Sep 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.