Skip to content

Commit

Permalink
Fix some minor issues with undefined data.
Browse files Browse the repository at this point in the history
  • Loading branch information
martindale committed Apr 9, 2015
1 parent ff92e53 commit bf1b633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ HTTP.prototype.provide = function() {
return obj;
}

if (data.populate) data.populate();
if (data && data.populate) data.populate();

if (data.toObject) {
if (data && data.toObject) {
var object = clean( data.toObject() );
} else if (data && data.map) {
var object = data.map(function(i) {
Expand Down

0 comments on commit bf1b633

Please sign in to comment.