Skip to content

Commit 2e7b9a1

Browse files
committed
[Routes] Document Potential Crash
1 parent 16a5796 commit 2e7b9a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: SwiftFlowGitHubBrowser/Routes/Routes.swift

+7
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ class MainViewRoutable: Routable {
181181
return BookmarkRoutable()
182182
}
183183

184+
// We can run into the following fatal error when back button on repository detail &
185+
// bookmark button on the main view controller are pressed very quickly subsequently.
186+
// This happens because the manual route update after the back button tap on the repository
187+
// detail view hasn't happened yet.
188+
// We could work around this with more hacks, but it wouldn't be useful to this example code.
189+
// A discussion/brainstorm for better ways of intercepting back button is going on here:
190+
// https://github.com/ReSwift/ReSwift-Router/issues/17
184191
fatalError("Cannot handle this route change!")
185192
}
186193

0 commit comments

Comments
 (0)