Skip to content

Commit

Permalink
revert: "remove optional chaining, not supported by microbundle yet"
Browse files Browse the repository at this point in the history
This reverts commit e933f6b.
  • Loading branch information
dominictwlee committed Jun 23, 2020
1 parent d73a625 commit 64c64de
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/useTourguide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export default function useTourguide() {
if (
node !== null &&
typeof position === 'number' &&
!node.isEqualNode(
allAnchorEls[position] ? allAnchorEls[position].node : null
)
!node.isEqualNode(allAnchorEls[position]?.node)
) {
setAllAnchorEls((prevEls) => {
const anchors = [...prevEls];
Expand Down

0 comments on commit 64c64de

Please sign in to comment.