Skip to content

Commit 2c4fc54

Browse files
fix: use children.length instead of querySelectorAll #336
Co-authored-by: alex chow <zhouchuanglin@gmail.com>
1 parent 5949a7f commit 2c4fc54

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • src/BootstrapBlazor/wwwroot/modules

src/BootstrapBlazor/wwwroot/modules/modal.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ export class Modal extends BlazorComponent {
161161
}
162162

163163
_hide() {
164-
const dialogs = this._element.querySelectorAll('.modal-dialog')
165-
if (dialogs.length === 1) {
164+
if (this._element.children.length === 1) {
166165
this._modal.hide()
167166
} else {
168167
this._invoker.invokeMethodAsync(this._invokerCloseMethod)

0 commit comments

Comments
 (0)