Skip to content

Commit e0475fe

Browse files
committed
Do not use optional chaining.
1 parent 2e0c771 commit e0475fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react/src/reactrouterv6-compat-utils.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ export function createV6CompatibleWrapCreateMemoryRouter<
139139
},
140140
): TRouter {
141141
const router = createRouterFunction(routes, opts);
142-
const basename = opts?.basename;
142+
const basename = opts ? opts.basename : undefined;
143143

144144
const activeRootSpan = getActiveRootSpan();
145145
let initialEntry = undefined;
146146

147-
const initialEntries = opts?.initialEntries;
148-
const initialIndex = opts?.initialIndex;
147+
const initialEntries = opts ? opts.initialEntries : undefined;
148+
const initialIndex = opts ? opts.initialIndex : undefined;
149149

150150
const hasOnlyOneInitialEntry = initialEntries && initialEntries.length === 1;
151151
const hasIndexedEntry = initialIndex !== undefined && initialEntries && initialEntries[initialIndex];

0 commit comments

Comments
 (0)