Skip to content

Commit

Permalink
fixed update flag checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Korostin committed Sep 12, 2019
1 parent b98cb28 commit 2b42350
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/jquery.skedTape.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ SkedTape.prototype = {
return this.render({preserveScroll: true});
},
updateUnlessOption: function(opts) {
return (this.$timeline && (!opts || opts.update)) ? this.update() : this;
var requested = !opts || opts.update === undefined || opts.update;
return (this.$timeline && requested) ? this.update() : this;
},
setSnapToMins: function(mins) {
this.snapToMins = mins;
Expand Down
3 changes: 2 additions & 1 deletion docs/jquery.skedTape.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,8 @@ SkedTape.prototype = {
return this.render({preserveScroll: true});
},
updateUnlessOption: function(opts) {
return (this.$timeline && (!opts || opts.update)) ? this.update() : this;
var requested = !opts || opts.update === undefined || opts.update;
return (this.$timeline && requested) ? this.update() : this;
},
setSnapToMins: function(mins) {
this.snapToMins = mins;
Expand Down
3 changes: 2 additions & 1 deletion src/jquery.skedTape.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,8 @@ SkedTape.prototype = {
return this.render({preserveScroll: true});
},
updateUnlessOption: function(opts) {
return (this.$timeline && (!opts || opts.update)) ? this.update() : this;
var requested = !opts || opts.update === undefined || opts.update;
return (this.$timeline && requested) ? this.update() : this;
},
setSnapToMins: function(mins) {
this.snapToMins = mins;
Expand Down

0 comments on commit 2b42350

Please sign in to comment.