Commit 1327be69 authored by Ian Hickson's avatar Ian Hickson

Merge pull request #968 from Hixie/scaffold-without-navigator

Make Navigator.canPop handle the no-navigator case
parents ef57c4ee a0d65729
......@@ -145,7 +145,7 @@ class Navigator extends StatefulComponent {
static bool canPop(BuildContext context) {
NavigatorState navigator = context.ancestorStateOfType(NavigatorState);
return navigator.canPop();
return navigator != null && navigator.canPop();
}
static void popAndPushNamed(BuildContext context, String routeName, { Set<Key> mostValuableKeys }) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment