Skip to content

Convert examples/node/pdf2svg.js to await/async #14125 #14159

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

Merged

Conversation

stbensonimoh
Copy link
Contributor

Because
pdf2svg.js uses chain of promises

This pull request

Convert examples/components/simpleviewer.js to await/async

Issue that this pull request solves

Closes: #14125

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this patch breaks the example, and running it no longer generates any svg-files at all. For future reference: Please don't submit a pull request unless you've successfully tested it locally.

To test this locally:

  1. Run gulp dist-install.
  2. cd into the examples/node/ directory.
  3. Run node pdf2svg.js.
  4. Repeat step 3 after making changes to the example.

When addressing the comments, please keep https://github.com/mozilla/pdf.js/wiki/Squashing-Commits in mind.

@stbensonimoh stbensonimoh force-pushed the convert-example-to-async-await branch from 1278cbf to 7b251aa Compare October 19, 2021 12:27
@stbensonimoh stbensonimoh force-pushed the convert-example-to-async-await branch from 7b251aa to 10af5da Compare October 19, 2021 21:28
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with the comment addressed; thank you!

@stbensonimoh stbensonimoh force-pushed the convert-example-to-async-await branch from 10af5da to 0643ccb Compare October 20, 2021 20:52
@Snuffleupagus Snuffleupagus merged commit 7c9e578 into mozilla:master Oct 21, 2021
@timvandermeij timvandermeij removed the request for review from Snuffleupagus October 22, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert examples/node/pdf2svg.js to await/async
3 participants