Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix utils.warn usage in strict mode. #411

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

indo-dev-0
Copy link

This includes three commits because I don't have time to figure out how to create a PR for single commit (sorry!) but it should be easy to cherry pick just 8483258.

This fixes #324 by type checking console instead of binding to a global.

irnc added a commit to irnc/lunr.js that referenced this pull request May 14, 2022
Fixes olivernn#324 (allowing lunr.js import as module and usage in other strict environments) by switching lunr itself to strict mode and fixing `this` usage.

`wrapper_end` was updated to the latest version of template, which uses `self` to access window and thus works in strict mode.

`lurn.utils.warn` was changed as in olivernn#411

Tests added work both in Node and browser.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

global is undefined in strict mode
2 participants