-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Context
No response
Bug description
lunrjs has en issue olivernn/lunr.js#324 when working in strict mode ("use strict";)
Since 8.3.7 "use strict"; added to the beginning of search bundle.
This lead to the issue search in blower doesn't work because of JS error
search.07f07601.min.js:8 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'console')
at Object.warn (search.07f07601.min.js:8:61)
at t.Pipeline.warnIfFunctionNotRegistered (search.07f07601.min.js:17:393)
at t.Pipeline. (search.07f07601.min.js:18:319)
at Array.forEach ()
at t.Pipeline.add (search.07f07601.min.js:18:288)
at t.Builder. (lunr.multi.min.js:1:686)
at t.Builder.use (search.07f07601.min.js:40:3184)
at t.Builder. (search.07f07601.min.js:40:17975)
at t (index.ts:192:2)
at new H (search.07f07601.min.js:40:17829)
This issue happened only if Vietnamese locale exists in i18n plugin
Related links
- global is undefined in strict mode olivernn/lunr.js#324
- Commit e868966#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519
Reproduction
Uploading 9.5.33-vietnamese-search.zip…
Steps to reproduce
- Define mkdocs:
site_name: My Docs
theme:
name: material
plugins:
- search
- i18n:
languages:
- locale: vi
name: Vietnamese
default: true
build: yes
nav_translations:
test: Hướng
- mkdocs serve --dev-addr=0.0.0.0:8000
- Try to search something.
- Check browsers console.
Browser
No response
Before submitting
- I have read and followed the bug reporting guidelines.
- I have attached links to the documentation, and possibly related issues and discussions.
- I assure that I have removed all customizations before submitting this bug report.
- I have attached a .zip file with a minimal reproduction using the built-in info plugin.