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(ExcelExport): Create JSZip with .default(). #8950

Merged
merged 2 commits into from
Feb 11, 2021

Conversation

gedinakova
Copy link
Contributor

@gedinakova gedinakova commented Feb 10, 2021

Closes #8940
Because of the way JSZip is imported in our project, the way we create the object needs to be changed.

const xlsx = new JSZip(); can be used when the import statement "import JSZip from "jszip";" format is allowed. When using "import * as JSZip from "jszip";" it would throw an error in the console "JSZip is not a constructor".

This may be tested here.
In Hello.component.ts, comment line 22, uncomment line 25 and check the console to see the error.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@onlyexeption onlyexeption added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels Feb 11, 2021
@onlyexeption onlyexeption added ✅ status: verified Applies to PRs that have passed manual verification and removed 💥 status: in-test PRs currently being tested labels Feb 11, 2021
@DiyanDimitrov DiyanDimitrov merged commit 22336e8 into master Feb 11, 2021
@DiyanDimitrov DiyanDimitrov deleted the gedinakova/fix-8940-master branch February 11, 2021 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
excel-exporter version: 11.1.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An error is thrown in the console when attempting to export to excel in a stackblitz sample.
3 participants