Skip to content

Commit a37f0fc

Browse files
committed
Fix an exception when F.route() linked to sitemap and the sitemap didn't exist.
1 parent 868210d commit a37f0fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ Framework.prototype.web = Framework.prototype.route = function(url, funcExecute,
13411341
})(viewname, sitemap, language);
13421342
} else if (typeof(funcExecute) !== 'function') {
13431343

1344-
viewname = sitemap && sitemap.url !== '/' ? sitemap.id : url;
1344+
viewname = (sitemap && sitemap.url !== '/' ? sitemap.id : url) || '';
13451345

13461346
if (viewname.endsWith('/'))
13471347
viewname = viewname.substring(0, viewname.length - 1);

0 commit comments

Comments
 (0)