Don't access response.data.tagname until we know it's not an error.
This wasn't causing any issues, because it was just setting itself to undefined, but I realized I should move it.
This commit is contained in:
parent
2d01297729
commit
4b76bc0628
1 changed files with 1 additions and 1 deletions
|
@ -310,7 +310,6 @@ function add_remove_photo_tag_callback(response)
|
|||
{
|
||||
let message_text;
|
||||
let message_positivity;
|
||||
let tagname = response.data.tagname;
|
||||
if ("error_type" in response.data)
|
||||
{
|
||||
message_positivity = "message_negative";
|
||||
|
@ -318,6 +317,7 @@ function add_remove_photo_tag_callback(response)
|
|||
}
|
||||
else
|
||||
{
|
||||
const tagname = response.data.tagname;
|
||||
let action;
|
||||
message_positivity = "message_positive";
|
||||
if (response.meta.request_url.includes("add_tag"))
|
||||
|
|
Loading…
Reference in a new issue