Commit 9e2b6711 authored by Boris Kocherov's avatar Boris Kocherov

trivial change for better code understood

parent fbd9424c
...@@ -72,11 +72,11 @@ ...@@ -72,11 +72,11 @@
} }
function checkCircular(urls, path, url) { function checkCircular(urls, path, url) {
var required_stack, var stack,
idx, idx,
prev_field_path = getMaxPathInDict(urls, path); prev_field_path = getMaxPathInDict(urls, path);
required_stack = urls[prev_field_path] || []; stack = urls[prev_field_path] || [];
idx = required_stack.indexOf(url); idx = stack.indexOf(url);
if (idx >= 0) { if (idx >= 0) {
if (path === prev_field_path && idx === 0) { if (path === prev_field_path && idx === 0) {
return; return;
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
return true; return true;
} }
// copy and add url as first element // copy and add url as first element
urls[path] = [url].concat(required_stack); urls[path] = [url].concat(stack);
} }
function checkHardCircular(g, path, url) { function checkHardCircular(g, path, url) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment