Skip to content

Commit

Permalink
[Fix Wildhoney#91] Cannot specify options
Browse files Browse the repository at this point in the history
  • Loading branch information
lardawge committed Aug 28, 2015
1 parent 770fd96 commit 51e69e4
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions components/Droplet.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,18 +258,22 @@
*/
init() {

set(this, 'files', []);
set(this, 'hooks', {});

Object.keys(DEFAULT_OPTIONS).forEach(key => {

// Copy across all of the options into the options map.
set(this, `options.${key}`, DEFAULT_OPTIONS[key]);
if (!get(this, `options.${key}`)) {
set(this, `options.${key}`, DEFAULT_OPTIONS[key]);
};

});

set(this, 'options.requestHeaders', {});
set(this, 'options.requestPostData', {});
if (!get(this, 'options.requestHeaders')) {
set(this, 'options.requestHeaders', {});
};

if (!get(this, 'options.requestHeaders')) {
set(this, 'options.requestPostData', {});
};

this.DropletEventBus && this.DropletEventBus.subscribe(EVENT_NAME, this, (...files) => {
this.send('prepareFiles', ...files);
Expand Down

0 comments on commit 51e69e4

Please sign in to comment.