From 47f866b0a5ea92ef6a008ed4643fd323e11a58e4 Mon Sep 17 00:00:00 2001 From: ztecharoberts Date: Tue, 11 Apr 2017 02:19:09 -0500 Subject: [PATCH] Allow for empty segment This is useful for people who would like a home page with no segment. --- src/deep-linking/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deep-linking/util.ts b/src/deep-linking/util.ts index 686c4cae..404e5061 100644 --- a/src/deep-linking/util.ts +++ b/src/deep-linking/util.ts @@ -252,7 +252,7 @@ export function convertDeepLinkConfigEntriesToString(entries: DeepLinkConfigEntr export function convertDeepLinkEntryToJsObjectString(entry: DeepLinkConfigEntry) { const defaultHistoryWithQuotes = entry.defaultHistory.map(defaultHistoryEntry => `'${defaultHistoryEntry}'`); - const segmentString = entry.segment && entry.segment.length ? `'${entry.segment}'` : null; + const segmentString = entry.segment ? `'${entry.segment}'` : null; return `{ loadChildren: '${entry.userlandModulePath}${LOAD_CHILDREN_SEPARATOR}${entry.className}', name: '${entry.name}', segment: ${segmentString}, priority: '${entry.priority}', defaultHistory: [${defaultHistoryWithQuotes.join(', ')}] }`; }