Skip to content

Commit

Permalink
Used the typeof operator to check for the offset variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Caldwell committed Apr 1, 2011
1 parent 3e4868c commit 406c232
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/toggle.js
Expand Up @@ -27,7 +27,7 @@ SparkFn.toggle = function(method, timeframe, easing, callback) {
}

// Initiate the offset as 0 if there is none
if(!this.offset) {
if(typeof this.offset === 'undefined') {
this.offset = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/transition.js
Expand Up @@ -20,7 +20,7 @@ SparkFn.transition = function(method, timeframe, easing, callback) {
}

// Initiate the offset as 0 if there is none
if(!this.offset) {
if(typeof this.offset === 'undefined') {
this.offset = 0;
}

Expand Down

0 comments on commit 406c232

Please sign in to comment.