@primer/behaviors 0.0.0-20240821180823 → 0.0.0-20240821183620

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ function observeFocusTrap(container, sentinels) {
23
23
  const observer = new MutationObserver(mutations => {
24
24
  for (const mutation of mutations) {
25
25
  if (mutation.type === 'childList' && mutation.addedNodes.length) {
26
- const sentinelChildren = Array.from(mutation.addedNodes, e => e instanceof HTMLElement && e.classList.contains('sentinel') && e.tagName === 'SPAN');
26
+ const sentinelChildren = Array.from(mutation.addedNodes).filter(e => e instanceof HTMLElement && e.classList.contains('sentinel') && e.tagName === 'SPAN');
27
27
  if (sentinelChildren.length) {
28
28
  return;
29
29
  }
@@ -21,7 +21,7 @@ function observeFocusTrap(container, sentinels) {
21
21
  const observer = new MutationObserver(mutations => {
22
22
  for (const mutation of mutations) {
23
23
  if (mutation.type === 'childList' && mutation.addedNodes.length) {
24
- const sentinelChildren = Array.from(mutation.addedNodes, e => e instanceof HTMLElement && e.classList.contains('sentinel') && e.tagName === 'SPAN');
24
+ const sentinelChildren = Array.from(mutation.addedNodes).filter(e => e instanceof HTMLElement && e.classList.contains('sentinel') && e.tagName === 'SPAN');
25
25
  if (sentinelChildren.length) {
26
26
  return;
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/behaviors",
3
- "version": "0.0.0-20240821180823",
3
+ "version": "0.0.0-20240821183620",
4
4
  "description": "Shared behaviors for JavaScript components",
5
5
  "type": "commonjs",
6
6
  "main": "dist/cjs/index.js",