Skip to content

Simplify fetch() calls in JavaScript #1348

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
Oct 2, 2020
Merged

Simplify fetch() calls in JavaScript #1348

merged 1 commit into from
Oct 2, 2020

Conversation

jdufresne
Copy link
Contributor

The fetch() init object does not have a property "url", so remove it.

The element being either a button or a element is mutually exclusive, so
use an "else if".

When a button is pressed, an enclosing form element already exist, so
remove the guard.

Assign the object properties in the object literal instead of after.

The fetch() init object does not have a property "url", so remove it.

The element being either a button or a element is mutually exclusive, so
use an "else if".

When a button is pressed, an enclosing form element already exist, so
remove the guard.

Assign the object properties in the object literal instead of after.
@matthiask
Copy link
Member

I think this looks good, thanks!

Copy link
Member

@tim-schilling tim-schilling left a comment

Choose a reason for hiding this comment

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

Looks good! I verified things are working locally.

@matthiask matthiask merged commit 4183395 into django-commons:master Oct 2, 2020
@matthiask
Copy link
Member

🎉

@jdufresne jdufresne deleted the prop branch October 2, 2020 09:51
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.

3 participants