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

Strict mode in core-js errors in Zotero 6 #319

Closed
dvanoni opened this issue Aug 15, 2023 · 1 comment · Fixed by #413
Closed

Strict mode in core-js errors in Zotero 6 #319

dvanoni opened this issue Aug 15, 2023 · 1 comment · Fixed by #413

Comments

@dvanoni
Copy link
Owner

dvanoni commented Aug 15, 2023

As a follow-up to #317:

  • Determine why the use of strict mode in core-js v3.32.0 causes an error in Zotero 6
  • Implement a robust fix

Resources

@dvanoni
Copy link
Owner Author

dvanoni commented Sep 20, 2023

Maybe it's related to the fact that the "use strict"; statement comes after the banner in the bundled JS.

According to dev docs (emphasis added):

To invoke strict mode for an entire script, put the exact statement "use strict"; (or 'use strict';) before any other statements.

The bundled JS currently starts as follows:

if (!Zotero.Notero) {

// Make timer functions globally available in Zotero 6
if (typeof setTimeout === 'undefined') {
  var setTimeout = Zotero.setTimeout;
}
if (typeof clearTimeout === 'undefined') {
  var clearTimeout = Zotero.clearTimeout;
}

"use strict";
(() => {
  var __create = Object.create;
  var __defProp = Object.defineProperty;

@dvanoni dvanoni added this to Notero Oct 29, 2023
@github-project-automation github-project-automation bot moved this to Todo in Notero Oct 29, 2023
dvanoni added a commit that referenced this issue Jan 1, 2024
* refactor: Replace `Object.fromEntries` polyfill with patch

* refactor: Replace `core-js` with `core-js-pure` to avoid pollution

Closes #319

* build: Add schema definitions for JSON config files

* build: Remove unused `esbuild.js` entry from `.eslintignore`

* refactor: Format xhtml and xul files with Prettier

* feat: Support observing changes to Notero prefs

* feat: Replace Notion database ID text field with selection menu

* docs(README): Remove step about copying database ID

* docs(README): Remove FAQ about invalid request URL
@github-project-automation github-project-automation bot moved this from Todo to Done in Notero Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant