@remix-run/router 0.0.0-experimental-8f9ef191 → 0.0.0-experimental-35fa15e5

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v0.0.0-experimental-8f9ef191
2
+ * @remix-run/router v0.0.0-experimental-35fa15e5
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -3954,7 +3954,13 @@ function getMatchesToLoad(history, state, matches, submission, location, isIniti
3954
3954
  // Is this route unhydrated (when v7_partialHydration=true) such that we need
3955
3955
  // to call it's loader on the initial router creation
3956
3956
  function isUnhydratedRoute(state, route) {
3957
- return route.loader != null && state.loaderData[route.id] === undefined && (!state.errors ||
3957
+ if (!route.loader) {
3958
+ return false;
3959
+ }
3960
+ if (route.loader.hydrate) {
3961
+ return true;
3962
+ }
3963
+ return state.loaderData[route.id] === undefined && (!state.errors ||
3958
3964
  // Loader ran but errored - don't re-run
3959
3965
  state.errors[route.id] === undefined);
3960
3966
  }