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

Update universaldetector.js to add missing const #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

luca-rath
Copy link

If used with this options

{ detectEncodings: ["UTF-8", "windows-1252"] }

the following error occurs:

ERROR Error: Uncaught (in promise): ReferenceError: lowerDetectedEncodings is not defined
ReferenceError: lowerDetectedEncodings is not defined
    at canDetectEncoding (universaldetector.js:110:27)
    at UniversalDetector.feed (universaldetector.js:140:55)
    at runUniversalDetector (index.js:52:11)
    at exports.detect (index.js:34:13)
    at Papaparse.ts:20:30
    at _ZoneDelegate.invoke (zone.umd.js:411:30)
    at Object.onInvoke (core.mjs:11083:33)
    at _ZoneDelegate.invoke (zone.umd.js:410:56)
    at Zone.run (zone.umd.js:165:47)
    at zone.umd.js:1314:38
    at resolvePromise (zone.umd.js:1250:35)
    at zone.umd.js:1321:21
    at _ZoneDelegate.invokeTask (zone.umd.js:445:35)
    at core.mjs:10757:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:10757:36)
    at _ZoneDelegate.invokeTask (zone.umd.js:444:64)
    at Object.onInvokeTask (core.mjs:11070:33)
    at _ZoneDelegate.invokeTask (zone.umd.js:444:64)
    at Zone.runTask (zone.umd.js:210:51)
    at drainMicroTaskQueue (zone.umd.js:634:39)

With the proposed changes, the error doesn't occur.
This bug has been introduced in #91

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.

1 participant