Skip to content
Snippets Groups Projects
Unverified Commit 8fdc8dca authored by Xaver Maierhofer's avatar Xaver Maierhofer
Browse files

[TASK] Avoid unnassary loops in domain name mapping

parent 77c94a1f
No related branches found
No related tags found
No related merge requests found
......@@ -9,5 +9,6 @@ rules:
"func-names": 0
"guard-for-in": 0
"no-undefined": 0
"consistent-return": 0
"no-nested-ternary": 0
"no-extend-native": ["error", { "exceptions": ["String"] }]
......@@ -110,9 +110,10 @@ define(['d3-interpolate', 'snabbdom', 'utils/version', 'filters/genericnode', 'h
var domainDict = count(nodes, ['domain'], function (d) {
if (config.domainNames) {
config.domainNames.forEach(function (t) {
config.domainNames.some(function (t) {
if (d === t.domain) {
d = t.name;
return true;
}
});
}
......
......@@ -71,9 +71,10 @@ define(['snabbdom', 'helper', 'moment'], function (V, helper, moment) {
self.showDomain = function showDomain(d) {
var rt = d.domain;
if (config.domainNames) {
config.domainNames.forEach(function (t) {
if (d.domain === t.domain) {
config.domainNames.some(function (t) {
if (rt === t.domain) {
rt = t.name;
return true;
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment