Fix optional file fields with RB.BaseResource.

Review Request #4259 — Created June 25, 2013 and submitted

Information

Review Board
master

Reviewers

Fix optional file fields with RB.BaseResource.

In change 624e56e I gave BaseResource the ability to upload multiple files as
part of an API request. This worked, but wasn't able to cope with file fields
that are optional. In the case where one or more of the fields pointed to by
payloadFileKeys was undefined, it would raise a TypeError.
Used this in conjunction with my pre-commit WIP, which can sometimes upload
only one file to a resource that takes two.
chipx86
  1. Looks fine, but one question. Up to you.
  2. Do we need to compare directly against undefined, or can we just check for falsiness? I don't think these can be valid falsy values.
    1. falsiness works fine. I'll make the change before I push.
  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (61d0708).