Skip to content

Commit

Permalink
Create a Region object even if not regions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rok-povsic committed Apr 9, 2018
1 parent ddee366 commit 6d8e063
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ class Input {
this.createdAt = data.created_at || data.createdAt;
this.imageUrl = data.data.image.url;
this.concepts = new Concepts(_config, data.data.concepts);
if (data.data.regions) {
this.regions = new Regions(_config, data.data.regions);
}
this.regions = new Regions(_config, data.data.regions || []);
this.score = data.score;
this.metadata = data.data.metadata;
if (data.data.geo && data.data.geo['geo_point']) {
Expand Down

0 comments on commit 6d8e063

Please sign in to comment.