mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-29 10:40:23 +00:00
search.js: check for search-input element early (#32100)
This commit is contained in:
parent
e347441f88
commit
1d86fcee7b
1 changed files with 3 additions and 2 deletions
|
|
@ -5,11 +5,12 @@
|
|||
(function () {
|
||||
'use strict'
|
||||
|
||||
if (!window.docsearch) {
|
||||
var inputElement = document.getElementById('search-input')
|
||||
|
||||
if (!window.docsearch || !inputElement) {
|
||||
return
|
||||
}
|
||||
|
||||
var inputElement = document.getElementById('search-input')
|
||||
var siteDocsVersion = inputElement.getAttribute('data-docs-version')
|
||||
|
||||
document.addEventListener('keydown', function (event) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue