Skip to content

Commit 8c105ad

Browse files
committed
fix(navBar): check existence of leaving controller
Closes #2868
1 parent ecfd0e0 commit 8c105ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: js/angular/service/ionicConfig.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,14 @@ IonicModule
406406
}
407407

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

415415
function leave(ctrlA, ctrlB, step) {
416-
if (!ctrlA) return;
416+
if (!ctrlA || !ctrlB) return;
417417
var titleX = (-(ctrlA.titleTextX() - ctrlB.backButtonTextLeft()) - (ctrlA.titleLeftRight())) * step;
418418
setStyles(ctrlA, 1 - step, titleX, 0);
419419
}

0 commit comments

Comments
 (0)