Skip to content

fix(amplify_core): fixes bug with empty array #19

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 5 commits into from
Aug 10, 2020

Conversation

haverchuck
Copy link
Contributor

Description of changes:
Fixes bug in addPlugin method.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@haverchuck haverchuck changed the title Add fix fix(amplify_core): fixes bug with empty array Aug 9, 2020
@@ -20,12 +20,12 @@ class Amplify {
try {
if (authPlugin != null && authPlugin.length == 1) {
Auth.addPlugin(authPlugin[0]);
} else if (authPlugin.length > 1) {
} else if (authPlugin != null && authPlugin.length > 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Not part of this change but if 'authPlugin' sounds singular and not like a list. Shouldn't it be a plural name? 'authPlugins'?

Copy link
Contributor

@Ashish-Nanda Ashish-Nanda left a comment

Choose a reason for hiding this comment

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

Minor comment about naming, otherwise LGTM.

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