Skip to content

Commit

Permalink
Bug fix refresh url
Browse files Browse the repository at this point in the history
  • Loading branch information
vash15 committed Dec 3, 2014
1 parent 407dc53 commit cd521f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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": "1.0.5",
"version": "1.0.6",
"homepage": "https://github.com/vash15/backbone.viewstack",
"authors": [
"Michele Belluco <[email protected]>",
Expand Down
6 changes: 4 additions & 2 deletions lib/viewstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ var ViewStack = module.exports = Backbone.View.extend({
refreshUrl: function refreshUrl(url) {
var context = this._context;

if ( context && typeof url !== "undefined" ) {
if (!url) {
var stack = this._stack;
var aChunck;
url = [];
Expand All @@ -170,9 +170,11 @@ var ViewStack = module.exports = Backbone.View.extend({
url.push(aChunck);
});
url = url.join('/');
context.page.navigate(url, { trigger: false });
}

if ( context && typeof url == "string" )
context.page.navigate(url, { trigger: false });

return this;
},

Expand Down

0 comments on commit cd521f9

Please sign in to comment.