Closed
Bug 877578
Opened 11 years ago
Closed 11 years ago
apiUtils.validateOptions ignores default values once an error has been thrown
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: robwu, Unassigned)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release) Build ID: 20130514193536 Steps to reproduce: I defined a validator with at least two keys, and executed it on an empty object: let val = apiUtils.validateOptions({}, { bar: { map: function(v) { throw "bar" } }, baz: { map: function(v) "foo" } }); Actual results: The result was an empty object. Expected results: The result should consist of the key `baz` with value "foo". Proposed a fix in https://github.com/mozilla/addon-sdk/pull/1006
Comment 1•11 years ago
|
||
Pointer to Github pull-request
Updated•11 years ago
|
Attachment #756082 -
Flags: review+
Comment 2•11 years ago
|
||
Commit pushed to master at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/53c12b16b4cea1e535d1020d202d6c7875944905 Merge pull request #1006 from Rob--W/api-utils-validateOptions Bug 877578 - Corrected implementation of validateOptions from api-utils r=erikvold
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Priority: -- → P2
Resolution: --- → FIXED
Comment 3•11 years ago
|
||
Commit pushed to integration at https://github.com/mozilla/addon-sdk https://github.com/mozilla/addon-sdk/commit/53c12b16b4cea1e535d1020d202d6c7875944905 Merge pull request #1006 from Rob--W/api-utils-validateOptions
You need to log in
before you can comment on or make changes to this bug.
Description
•