From 0764aaade849129afadae3d4b3f67c5c40225bde Mon Sep 17 00:00:00 2001 From: lokaesshwar Date: Sat, 1 Mar 2025 22:07:51 +0530 Subject: [PATCH] Fix: Ensure valid overlay-wrapper ID assignment --- src/overlay.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/overlay.js b/src/overlay.js index 61f5fa88..eac53c3d 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -132,11 +132,8 @@ this.element = options.element; this.elementWrapper.appendChild(this.element); - if (this.element.id) { - this.elementWrapper.id = "overlay-wrapper-" + this.element.id; - } else { - this.elementWrapper.id = "overlay-wrapper"; - } + this.elementWrapper.id = "overlay-wrapper" + (this.element.id ? "-" + this.element.id : ""); + this.style = this.elementWrapper.style; this._init(options);