Skip to content

Commit

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

0 comments on commit e933f6b

Please sign in to comment.