fallback to mdoc variables to support documents which were generated before the variable name change
@@ -19,8 +19,8 @@ import QueryResult from './QueryResult'
class Search {
constructor(allPages) {
this.allPages = allPages
- this.searchIdx = window.znaiSearchIdx
- this.searchDataById = mapById(window.znaiSearchData)
+ this.searchIdx = (window.znaiSearchIdx === undefined) ? window.mdocSearchIdx : window.znaiSearchIdx
+ this.searchDataById = mapById((window.znaiSearchData === undefined) ? window.mdocSearchData : window.znaiSearchData)
}
static convertIndexIdToSectionCoords(indexId) {
