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

html export fails on second attempt #7

Closed
mfsbo opened this issue Jan 21, 2020 · 4 comments
Closed

html export fails on second attempt #7

mfsbo opened this issue Jan 21, 2020 · 4 comments

Comments

@mfsbo
Copy link
Contributor

mfsbo commented Jan 21, 2020

Describe the bug
When you click on html export on example page it opens a browser print dialogue. If you cancel it and click on export button second time it gives an error in console and fails. It should open dialogue whenever export button is pressed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://gharibi.github.io/JsObjExporter/examples/example.html'
  2. Click on 'Generate PDF under HTML to PDF'
  3. A print dialogue would open with Print and Cancel options.
  4. Click on Cancel
  5. Click on 'Generate PDF under HTML to PDF' again
  6. Open Console and see errors it would show Uncaught TypeError: Cannot read property 'remove' of null on document.getElementById("testFrame").remove()

Expected behavior
There should be no errors in console.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 79.0.3945.117 (Official Build) (64-bit)

Additional context
I have included the js file from cdn https://www.jsdelivr.com/package/npm/object-exporter

@gharibi
Copy link
Owner

gharibi commented Jan 22, 2020

Thanks @mfsbo for resolving this issue. I updated the version and published the updated version to npm.

@mfsbo
Copy link
Contributor Author

mfsbo commented Jan 22, 2020

You are welcome. Will get npm version tomorrow. Keep up the good work.

@mfsbo
Copy link
Contributor Author

mfsbo commented Jan 23, 2020

@gharibi I think you need to generate min file in the dist folder as well or will it be automatically updated. NPM still shows min file with testFrame.

@gharibi
Copy link
Owner

gharibi commented Jan 23, 2020

Thanks for pointing it out. I republished it to npm. It should be fine in v3.4.8.

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