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