@tanstack/react-router 1.5.9 → 1.5.10

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.
@@ -2155,7 +2155,11 @@
2155
2155
  ...newOptions
2156
2156
  };
2157
2157
  if (!this.basepath || newOptions.basepath && newOptions.basepath !== previousOptions.basepath) {
2158
- this.basepath = `/${trimPath(newOptions.basepath ?? '') ?? ''}`;
2158
+ if (newOptions.basepath === undefined || newOptions.basepath === '' || newOptions.basepath === '/') {
2159
+ this.basepath = '/';
2160
+ } else {
2161
+ this.basepath = `/${trimPath(newOptions.basepath)}`;
2162
+ }
2159
2163
  }
2160
2164
  if (!this.history || this.options.history && this.options.history !== this.history) {
2161
2165
  this.history = this.options.history ?? (typeof document !== 'undefined' ? createBrowserHistory() : createMemoryHistory({