From c52b3b499756fd6913eb92c5317eb23c01deec93 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Tue, 23 Jul 2019 16:11:29 -0500 Subject: [PATCH] fix(hydrate): check for client runtime method (#18866) --- .../directives/navigation/stack-controller.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/angular/src/directives/navigation/stack-controller.ts b/angular/src/directives/navigation/stack-controller.ts index 4a277eae99..2fcbe94824 100644 --- a/angular/src/directives/navigation/stack-controller.ts +++ b/angular/src/directives/navigation/stack-controller.ts @@ -225,13 +225,15 @@ export class StackController { containerEl.appendChild(enteringEl); } - return containerEl.commit(enteringEl, leavingEl, { - deepWait: true, - duration: direction === undefined ? 0 : undefined, - direction, - showGoBack, - progressAnimation - }); + if ((containerEl as any).commit) { + return containerEl.commit(enteringEl, leavingEl, { + deepWait: true, + duration: direction === undefined ? 0 : undefined, + direction, + showGoBack, + progressAnimation + }); + } } return Promise.resolve(false); }