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

System is logging fileBlob.text is not a function errors #557

Open
zfi opened this issue Apr 7, 2021 · 1 comment
Open

System is logging fileBlob.text is not a function errors #557

zfi opened this issue Apr 7, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zfi
Copy link
Contributor

zfi commented Apr 7, 2021

This error is logged when an attempt is made to open a Solo project.

User environment:

User Agent: Mozilla/5.0 (X11; CrOS x86_64 11316.165.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.122 Safari/537.36

Browser: Chrome v72.0.3626
OS: Chrome OS v11316.165.0
@zfi zfi added the bug Something isn't working label Apr 7, 2021
@zfi zfi added this to the Release 1.5.7.2 milestone Apr 7, 2021
@zfi zfi self-assigned this Apr 7, 2021
@zfi
Copy link
Contributor Author

zfi commented Apr 8, 2021

Support for the blob.text() method was introduced in Chrome v76.x. The browser in this report is running Chrome v72, so the feature is not supported.

However, when reviewing this code, there is a defect in the handling of the initial promise returned by the fileBlob.text() call. Need to remove the second fileBloc.text() call while retaining the .then from the initial promise.

  // TODO: Refactor this to ES5 for support in Safari and Opera
  // eslint-disable-next-line no-unused-vars
  const textPromise = fileBlob.text();  <<===
  fileBlob.text().then((text) => {
    if (text && text.length > 0) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants