Skip to content

Updating API example for initializing ES6-variant of Patch #47

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
merged 1 commit into from
Dec 2, 2021

Conversation

johnnyman727
Copy link
Contributor

Ran into this bug while hacking :)

@pcothenet
Copy link
Contributor

Thanks @johnnyman727 . I am a bit surprised by this one. You had this issue while using an import statement?

@johnnyman727
Copy link
Contributor Author

Yeah, FWIW, here is the error message I got without this change:

[0] const patch = Patch(env['PATCH_TEST_API_KEY']);
[0]               ^
[0]
[0] TypeError: Patch is not a function

If I console.log the value of Patch before this error, I get:

[0] Patch is: { default: [Function: Patch] }

I'm guessing that you probably want to reject this PR and update the export so from the Node module so you don't need the default at all.

@pcothenet pcothenet merged commit b8c6351 into patch-technology:main Dec 2, 2021
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