mirror of
https://github.com/twbs/bootstrap.git
synced 2025-03-15 15:29:22 +01:00
search.js: check for search-input
element early (#32100)
This commit is contained in:
parent
45bf55e4ba
commit
fb12b0bd6a
@ -5,11 +5,12 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict'
|
'use strict'
|
||||||
|
|
||||||
if (!window.docsearch) {
|
var inputElement = document.getElementById('search-input')
|
||||||
|
|
||||||
|
if (!window.docsearch || !inputElement) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var inputElement = document.getElementById('search-input')
|
|
||||||
var siteDocsVersion = inputElement.getAttribute('data-docs-version')
|
var siteDocsVersion = inputElement.getAttribute('data-docs-version')
|
||||||
|
|
||||||
function getOrigin() {
|
function getOrigin() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user