Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Feb 13, 2024
1 parent c10892b commit 7f307fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions js/src/dom/selector-engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const getSelector = element => {

selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null
}
return selector.split(',').map(sel=>parseSelector(sel)).join(',')

return selector?.split(',').map(sel => parseSelector(sel)).join(',')
}

const SelectorEngine = {
Expand Down
25 changes: 12 additions & 13 deletions js/tests/unit/modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,24 +995,23 @@ describe('Modal', () => {
it('should open modal, having special characters in its id', () => {
return new Promise(resolve => {
fixtureEl.innerHTML = [
'<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#j_id22:exampleModal">',
' Launch demo modal',
'</button>',
'<div class="modal fade" id="j_id22:exampleModal" aria-labelledby="exampleModalLabel" aria-hidden="true">',
' <div class="modal-dialog">',
' <div class="modal-content">',
' <div class="modal-body">',
' <p>modal body</p>',
' </div>',
' </div>',
' </div>',
'</div>',
'<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#j_id22:exampleModal">',
' Launch demo modal',
'</button>',
'<div class="modal fade" id="j_id22:exampleModal" aria-labelledby="exampleModalLabel" aria-hidden="true">',
' <div class="modal-dialog">',
' <div class="modal-content">',
' <div class="modal-body">',
' <p>modal body</p>',
' </div>',
' </div>',
' </div>',
'</div>'
].join('')

const modalEl = fixtureEl.querySelector('.modal')
const trigger = fixtureEl.querySelector('[data-bs-toggle="modal"]')


modalEl.addEventListener('shown.bs.modal', () => {
resolve()
})
Expand Down

0 comments on commit 7f307fc

Please sign in to comment.