Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
names.forEach(name => {
let config = viewsObject[name];
name = name || "$default"; // Account for views: { "": { component... } }
if (Object.keys(config).length == 0) return;
config.$type = "polymer";
config.$context = state;
config.$name = name;
let normalized = routerCore.ViewService.normalizeUIViewTarget(config.$context, config.$name);
config.$uiViewName = normalized.uiViewName;
config.$uiViewContextAnchor = normalized.uiViewContextAnchor;
views[name] = config;
});
return views;