add null handling and fix merge conflicts
This commit is contained in:
parent
8580a1f463
commit
6e0a4b058d
4 changed files with 37 additions and 34 deletions
|
@ -31,7 +31,7 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||
} else {
|
||||
const node = document.createElement('p')
|
||||
node.textContent = 'Please enter a word or phrase above'
|
||||
window.getElementById('search-results').append(node)
|
||||
document.getElementById('search-results')?.append(node)
|
||||
}
|
||||
|
||||
function executeSearch (searchQuery) {
|
||||
|
@ -48,7 +48,7 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||
} else {
|
||||
const node = document.createElement('p')
|
||||
node.textContent = 'No matches found'
|
||||
window.getElementById('search-results').append(node)
|
||||
document.getElementById('search-results')?.append(node)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue