Skip to content

Commit

Permalink
triple equals for logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Rose, Victoria A committed Sep 28, 2021
1 parent cd6b9aa commit efa9c7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/mgmt/static/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function resource_formatter(response, detail_base_url, delete_function, delete_b
for (var idx in response) {
var actions_str = "<a type='button' class='btn btn-default btn-sm action-button' href=" + detail_base_url + response[idx] + ">";
actions_str += "<span class='glyphicon glyphicon-pencil' aria-hidden='true'></span> Details</a>";
if (is_admin){
if (is_admin === true){
actions_str += "<a type='button' class='btn btn-danger btn-sm action-button' href='javascript:void(0);' onclick='" + delete_function + "(\"" + delete_base_url + response[idx] + "\")'>";
actions_str += "<span class='glyphicon glyphicon-remove' aria-hidden='true'></span> Delete</a>";
}
Expand All @@ -199,7 +199,7 @@ function channel_resource_formatter(response, detail_base_url, delete_function,
actions_str += "<span class='glyphicon glyphicon-pencil' aria-hidden='true'></span> Details</a>";
actions_str += "<a type='button' class='btn btn-default btn-sm action-button' href=" + neuroglancer_url + response[idx] + "','name':'" + response[idx] + "'}}}" + ">";
actions_str += "<span class='glyphicon' aria-hidden='true'></span> Neuroglancer</a>";
if (is_admin){
if (is_admin === true){
actions_str += "<a type='button' class='btn btn-danger btn-sm action-button' href='javascript:void(0);' onclick='" + delete_function + "(\"" + delete_base_url + response[idx] + "\")'>";
actions_str += "<span class='glyphicon glyphicon-remove' aria-hidden='true'></span> Delete</a>";
}
Expand Down

0 comments on commit efa9c7b

Please sign in to comment.