Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 47f866b

Browse files
author
ztecharoberts
authored
Allow for empty segment
This is useful for people who would like a home page with no segment.
1 parent be8e726 commit 47f866b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/deep-linking/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export function convertDeepLinkConfigEntriesToString(entries: DeepLinkConfigEntr
252252

253253
export function convertDeepLinkEntryToJsObjectString(entry: DeepLinkConfigEntry) {
254254
const defaultHistoryWithQuotes = entry.defaultHistory.map(defaultHistoryEntry => `'${defaultHistoryEntry}'`);
255-
const segmentString = entry.segment && entry.segment.length ? `'${entry.segment}'` : null;
255+
const segmentString = entry.segment ? `'${entry.segment}'` : null;
256256
return `{ loadChildren: '${entry.userlandModulePath}${LOAD_CHILDREN_SEPARATOR}${entry.className}', name: '${entry.name}', segment: ${segmentString}, priority: '${entry.priority}', defaultHistory: [${defaultHistoryWithQuotes.join(', ')}] }`;
257257
}
258258

0 commit comments

Comments
 (0)