Allow validateOptions to set default values for missing options

RESOLVED FIXED in 0.5

Status

Add-on SDK
General
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: zpao, Assigned: zpao)

Tracking

unspecified

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Currently if you use map to attempt to set a default value but the key wasn't included in the options, then the default value isn't included.
Created attachment 447467 [details] [diff] [review]
Patch v0.1

Like we talked about. Not sure how we do the reviews here, but you can bounce it if need be.
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #447467 - Flags: review?(adw)

Comment 2

8 years ago
Comment on attachment 447467 [details] [diff] [review]
Patch v0.1

Looks good, thanks.

>+    if (keyInOpts || req.map && !mapThrew)

Technically fine of course, but for clarity please add parens around the last two terms.

r=adw
Attachment #447467 - Flags: review?(adw) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Flags: in-testsuite+
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.