Skip to content

Commit

Permalink
Merge pull request #44 from theilliteratealliterator/master
Browse files Browse the repository at this point in the history
Fix incorrect indexing the items array in the update() function
  • Loading branch information
botelho committed Dec 21, 2015
2 parents 104931d + cd835cc commit 5019e0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/bookblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
// public method: dynamically adds new elements
// call this method after inserting new "bb-item" elements inside the BookBlock
update : function () {
var currentItem = this.items[ this.current ];
var currentItem = this.items[ this.currentIdx ];
this.items = Array.prototype.slice.call( this.el.querySelectorAll( '.bb-item' ) );
this.itemsCount = this.items.length;
this.currentIdx = this.items.indexOf( currentItem );
Expand Down
2 changes: 1 addition & 1 deletion js/bookblock.min.js

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

0 comments on commit 5019e0d

Please sign in to comment.