react-router 0.0.0-experimental-178bc9ee → 0.0.0-experimental-4841e12b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router v0.0.0-experimental-178bc9ee
2
+ * React Router v0.0.0-experimental-4841e12b
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -548,9 +548,14 @@ function _renderMatches(matches, parentMatches, dataRouterState, future) {
548
548
  if (match.route.Fallback || match.route.fallbackElement) {
549
549
  fallbackIndex = i;
550
550
  }
551
- if (match.route.loader && match.route.id && dataRouterState.loaderData[match.route.id] === undefined) {
552
- // We found the first route without data, flag that we need to render
553
- // a fallback and render up until the appropriate fallback
551
+ if (match.route.loader && match.route.id && dataRouterState.loaderData[match.route.id] === undefined && (!dataRouterState.errors || dataRouterState.errors[match.route.id] === undefined)) {
552
+ // TODO:
553
+ // TODO: Add unit tests for this error flow!
554
+ // TODO:
555
+
556
+ // We found the first route without data/errors which means it's loader
557
+ // still needs to run. Flag that we need to render a fallback and
558
+ // render up until the appropriate fallback
554
559
  renderFallback = true;
555
560
  if (fallbackIndex >= 0) {
556
561
  renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);