Closed Bug 1250987 Opened 8 years ago Closed 8 years ago

Make RequestInit.body nullable

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

(Whiteboard: btpp-active)

Attachments

(1 file)

      No description provided.
Attachment #8723146 - Flags: review?(bzbarsky)
Comment on attachment 8723146 [details] [diff] [review]
Make RequestInit.body nullable

>+        if (body === undefined) {
>+          return {"method": method};
>+        } else {
>+          return {"method": method, "body": body};
>+        }

This is totally equivalent to just:

  return { "method": method, "body": body };

because dictionaries treat a value of undefined as "not present".

r=me with that.
Attachment #8723146 - Flags: review?(bzbarsky) → review+
Assignee: nobody → ehsan
Whiteboard: btpp-active
https://hg.mozilla.org/mozilla-central/rev/426b1ede1e00
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: