Skip to content

Commit

Permalink
refactor: used angular.isDefined() instead of typeof !== "undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyTheTank committed Feb 23, 2016
1 parent fd561f1 commit 3f48acc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
7 changes: 2 additions & 5 deletions dist/angular-flickr-api-factory.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
@name: angular-flickr-api-factory
@version: 0.5.0 (06-01-2016)
@version: 0.5.0 (23-02-2016)
@author: Jonathan Hornung
@url: https://github.com/JohnnyTheTank/angular-flickr-api-factory#readme
@license: MIT
Expand Down Expand Up @@ -55,7 +55,7 @@ angular.module("jtt_flickr", [])
this.fillDataInObjectByList = function (_object, _params, _list) {

angular.forEach(_list, function (value, key) {
if (typeof _params[value] !== "undefined") {
if (angular.isDefined(_params[value])) {
_object.object[value] = _params[value];
}
});
Expand All @@ -64,9 +64,6 @@ angular.module("jtt_flickr", [])
};

this.getNew = function (_type, _params) {

var defaultLimit = 20;

var flickrSearchData = {
object: {
jsoncallback:'JSON_CALLBACK',
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-flickr-api-factory.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/angular-flickr-api-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ angular.module("jtt_flickr", [])
this.fillDataInObjectByList = function (_object, _params, _list) {

angular.forEach(_list, function (value, key) {
if (typeof _params[value] !== "undefined") {
if (angular.isDefined(_params[value])) {
_object.object[value] = _params[value];
}
});
Expand All @@ -57,9 +57,6 @@ angular.module("jtt_flickr", [])
};

this.getNew = function (_type, _params) {

var defaultLimit = 20;

var flickrSearchData = {
object: {
jsoncallback:'JSON_CALLBACK',
Expand Down

0 comments on commit 3f48acc

Please sign in to comment.