Skip to content

Commit

Permalink
fix(navBar): check existence of leaving controller
Browse files Browse the repository at this point in the history
Closes #2868
  • Loading branch information
adamdbradley committed Feb 13, 2015
1 parent ecfd0e0 commit 8c105ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/angular/service/ionicConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,14 @@ IonicModule
}

function enter(ctrlA, ctrlB, step) {
if (!ctrlA) return;
if (!ctrlA || !ctrlB) return;
var titleX = (ctrlA.titleTextX() + ctrlA.titleWidth()) * (1 - step);
var backTextX = (ctrlB && (ctrlB.titleTextX() - ctrlA.backButtonTextLeft()) * (1 - step)) || 0;
setStyles(ctrlA, step, titleX, backTextX);
}

function leave(ctrlA, ctrlB, step) {
if (!ctrlA) return;
if (!ctrlA || !ctrlB) return;
var titleX = (-(ctrlA.titleTextX() - ctrlB.backButtonTextLeft()) - (ctrlA.titleLeftRight())) * step;
setStyles(ctrlA, 1 - step, titleX, 0);
}
Expand Down

0 comments on commit 8c105ad

Please sign in to comment.