Skip to content

Commit

Permalink
Merge pull request #173 from Starfox64/patch-1
Browse files Browse the repository at this point in the history
Fixed opts data not being validated
  • Loading branch information
Leah Jones committed Mar 12, 2016
2 parents ac63214 + 778d6f9 commit 5e8b158
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/clients/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ var forEach = require('lodash').forEach;
* @returns {object}
*/
var getData = function getData(data, token) {
var newData = assign({}, data ? data.opts || {} : {});
var newData = {};
assign(data, data ? data.opts || {} : {});

forEach(data || {}, function getValidData(val, key) {
if (!isUndefined(val) && val !== null && key !== 'opts') {
Expand Down

0 comments on commit 5e8b158

Please sign in to comment.