Skip to content

Conversation

Finesse
Copy link
Contributor

@Finesse Finesse commented Jan 21, 2020

When this package is used with Webpack, the following code gets to the bundle:

image

The root argument value is undefined so the root.jsonToFormData = factory() expression fails and the whole application breaks.

Usually UMD modules don't write to root when they are in AMD or CJS environment (see an UMD module template). I've added a root check to not break the backward compatibility.

@Finesse Finesse requested a review from hyperatom January 21, 2020 02:50
Copy link
Owner

@hyperatom hyperatom left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@hyperatom hyperatom merged commit 952c655 into hyperatom:master Feb 29, 2020
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.

2 participants