Skip to content

Commit 8fd58b4

Browse files
authored
refactor: simplify OverlayStackMixin attached instances logic (#9852)
1 parent 3a01e51 commit 8fd58b4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

packages/overlay/src/vaadin-overlay-stack-mixin.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ const attachedInstances = new Set();
1111
* Returns all attached overlays in visual stacking order.
1212
* @private
1313
*/
14-
const getAttachedInstances = () =>
15-
[...attachedInstances].filter(
16-
(el) => el instanceof HTMLElement && el._hasOverlayStackMixin && !el.hasAttribute('closing'),
17-
);
14+
const getAttachedInstances = () => [...attachedInstances].filter((el) => !el.hasAttribute('closing'));
1815

1916
/**
2017
* Returns true if all the instances on top of the overlay are nested overlays.
@@ -51,12 +48,6 @@ export const isLastOverlay = (overlay, filter = (_overlay) => true) => {
5148
*/
5249
export const OverlayStackMixin = (superClass) =>
5350
class OverlayStackMixin extends superClass {
54-
constructor() {
55-
super();
56-
57-
this._hasOverlayStackMixin = true;
58-
}
59-
6051
/**
6152
* Returns true if this is the last one in the opened overlays stack.
6253
*

0 commit comments

Comments
 (0)