Hi – great library, helped us a lot in setting up our tvOS app. But I believe I've come across a bug with the handling of error pages. The logic to detect whether to replace or push a document to the navigation stack is this, within the cleanNavigate method:
if (!replace && (!last || last !== loaderDoc || last !== errorDoc)) {
If the last doc was an errorDoc this returns true...as the last doc wasn't a loader doc. Therefore I believe it should be this:
if (!replace && (!last || ( last !== loaderDoc && last !== errorDoc ))) {
This will correctly fathom if the last doc was either an error or a loader, return false and proceed to replace the doc and not push.
If you are happy with this change I'll create a PR
Hi – great library, helped us a lot in setting up our tvOS app. But I believe I've come across a bug with the handling of error pages. The logic to detect whether to replace or push a document to the navigation stack is this, within the cleanNavigate method:
if (!replace && (!last || last !== loaderDoc || last !== errorDoc)) {
If the last doc was an errorDoc this returns true...as the last doc wasn't a loader doc. Therefore I believe it should be this:
if (!replace && (!last || ( last !== loaderDoc && last !== errorDoc ))) {
This will correctly fathom if the last doc was either an error or a loader, return false and proceed to replace the doc and not push.
If you are happy with this change I'll create a PR