Skip to content

Commit

Permalink
Prevent t.querySelectorAll is not a function error (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha authored Jan 25, 2024
1 parent b4acbc4 commit 0395baf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Prevent `addedNode.querySelectorAll is not a function` error (#13)

## [0.2.0] - 2024-01-04

### Fixed
- Fixed left/right arrow key behavior in RTL content (#9)
- Fixed left/right arrow key behavior in RTL content (#9)

## [0.1.0] - 2023-08-26

### Added
- Add style to fix bidi in the default theme (#4)
- Add style to fix bidi in the default theme (#4)

## [0.0.2] - 2023-08-25

Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ const applyBidi = () => {
if (mutation.type !== 'childList') return;

mutation.addedNodes.forEach((addedNode) => {
if (addedNode.nodeType !== Node.ELEMENT_NODE) return;

if (addedNode.classList?.contains('ls-block')) setDirAuto(addedNode);

const subLsBlocks = addedNode.querySelectorAll(cssSelector);
Expand Down

0 comments on commit 0395baf

Please sign in to comment.