From 9c36f8acb53bb50ce54eedcd4eb9fcacdba821fd Mon Sep 17 00:00:00 2001 From: Aurélien LAJOIE Date: Fri, 15 Oct 2021 17:57:03 +0200 Subject: jira: Fix warnings --- jira-widget/jira.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'jira-widget') diff --git a/jira-widget/jira.lua b/jira-widget/jira.lua index 45c632e..f34e951 100644 --- a/jira-widget/jira.lua +++ b/jira-widget/jira.lua @@ -168,12 +168,11 @@ local function worker(user_args) local cur_status = '' for _, issue in ipairs(result.issues) do - local path_to_avatar = HOME_DIR ..'/.cache/awmw/jira-widget/avatars/' .. issue.fields.assignee.name or issue.fields.assignee.displayName - local name = '' + local name if issue.fields.assignee.name == nil then - name = issue.fields.assignee.displayName - else - name = issue.fields.assignee.name + name = issue.fields.assignee.displayName + else + name = issue.fields.assignee.name end local path_to_avatar = HOME_DIR ..'/.cache/awmw/jira-widget/avatars/' .. name -- cgit v1.2.3