Skip to content

Simplify fetch() calls in JavaScript - #1348

Merged
matthiask merged 1 commit into
django-commons:masterfrom
jdufresne:prop
Oct 2, 2020
Merged

Simplify fetch() calls in JavaScript#1348
matthiask merged 1 commit into
django-commons:masterfrom
jdufresne:prop

Conversation

@jdufresne

Copy link
Copy Markdown
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
Copy Markdown
Member

I think this looks good, thanks!

@tim-schilling tim-schilling left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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