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

globalThis in lib/misc/utils.js #149

Closed
mnpenner opened this issue Feb 19, 2021 · 1 comment
Closed

globalThis in lib/misc/utils.js #149

mnpenner opened this issue Feb 19, 2021 · 1 comment

Comments

@mnpenner
Copy link

mnpenner commented Feb 19, 2021

Rollup.js is spitting out this error when I packaging mariadb:

(!) `this` has been rewritten to `undefined`
https://rollupjs.org/guide/en/#error-this-is-undefined
node_modules/mariadb/lib/misc/utils.js
149:         for (let i = 0; i < value.length; i++) {
150:           if (i !== 0) out += ',';
151:           out += this.escape(opts, info, value[i]);
                      ^
152:         }
153:         if (opts.arrayParenthesis) out += ')';

Line is here:

out += this.escape(opts, info, value[i]);

I can work around this, but you might consider changing this to globalThis or global.

@rusher
Copy link
Collaborator

rusher commented Feb 19, 2021

allright. This will be corrected in next version

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

No branches or pull requests

2 participants