From 6043618abdf957f1d2a4260d762f897c5d01af96 Mon Sep 17 00:00:00 2001 From: Goddchen Date: Mon, 4 Apr 2022 17:39:53 +0200 Subject: [PATCH] Need to break from the while loop when entry found --- package/lib/src/beamer_delegate.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/lib/src/beamer_delegate.dart b/package/lib/src/beamer_delegate.dart index 38ed3c87..c9091642 100644 --- a/package/lib/src/beamer_delegate.dart +++ b/package/lib/src/beamer_delegate.dart @@ -74,7 +74,7 @@ class BeamerDelegate extends RouterDelegate /// `*App.router` and at least one more [Beamer] in the Widget tree. BeamerDelegate? get parent => _parent; set parent(BeamerDelegate? parent) { - if(parent == null && _parent != null) { + if (parent == null && _parent != null) { _parent!.removeListener(_updateFromParent); _parent!._children.remove(this); _parent = null; @@ -609,6 +609,7 @@ class BeamerDelegate extends RouterDelegate } else { beamingHistory.last.history .removeRange(index, beamingHistory.last.history.length); + break; } } beamToNamed(