Skip to content

Commit

Permalink
Force the init stack
Browse files Browse the repository at this point in the history
  • Loading branch information
vash15 committed Jul 11, 2018
1 parent 64e014c commit e0ef0cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backbone.viewstack",
"version": "2.3.6",
"version": "2.3.7",
"homepage": "https://github.com/vash15/backbone.viewstack",
"authors": [
"Michele Belluco <[email protected]>",
Expand Down
6 changes: 3 additions & 3 deletions lib/viewstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@

},

initStack: function initStack(){
if ( this._length === null ){
this._length = this._stack.length;
initStack: function initStack(length){
if ( this._length === null || (_.isNumber(length) && !_.isNaN(length)) ){
this._length = _.isNumber(length) && !_.isNaN(length) ? length : this._stack.length;
return this;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backbone.viewstack",
"version": "2.3.6",
"version": "2.3.7",
"description": "View stack for Backbone",
"main": "lib/viewstack.js",
"repository": {
Expand Down

0 comments on commit e0ef0cf

Please sign in to comment.