Skip to content

Commit

Permalink
Merge pull request #44 from razh/duplicate_get_url
Browse files Browse the repository at this point in the history
Remove duplicate _get_url call
  • Loading branch information
ierror committed Oct 14, 2016
2 parents acfb120 + bd79a24 commit c512af9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django_js_reverse/templates/django_js_reverse/urls_js.tpl
Expand Up @@ -80,7 +80,7 @@
};
};

var name, pattern, self, url_patterns, _i, _len, _ref;
var name, pattern, url, url_patterns, _i, _len, _ref;
url_patterns = [
{% for name, patterns in urls %}
[
Expand All @@ -104,8 +104,9 @@
for (_i = 0, _len = url_patterns.length; _i < _len; _i++) {
_ref = url_patterns[_i], name = _ref[0], pattern = _ref[1];
self.url_patterns[name] = pattern;
Urls[name] = _get_url(name);
Urls[name.replace(/-/g, '_')] = _get_url(name);
url = _get_url(name);
Urls[name] = url;
Urls[name.replace(/-/g, '_')] = url;
}

return Urls;
Expand Down

0 comments on commit c512af9

Please sign in to comment.