Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent error for root shadow elements when restorEl is enabled (#…
…8679) Addresses an issue where activating the `restoreEl` option for an element at the root of a shadow DOM threw a "TypeError: el.parentNode.hasAttribute is not a function". The bug was due to the `parentNode` being a shadow root, which does not have the `hasAttribute` method. The fix implemented checks for the existence of the `hasAttribute` method on `parentNode`.
- Loading branch information