From c47e93aea089e9f2a36def7186d529ac54c8032f Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Tue, 20 Feb 2024 23:31:56 +0000 Subject: [PATCH] awesome: tidy some lint diagnostics in mpd_widget --- awesome/widgets/mpd_widget.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awesome/widgets/mpd_widget.lua b/awesome/widgets/mpd_widget.lua index 89deae1..ccd131e 100644 --- a/awesome/widgets/mpd_widget.lua +++ b/awesome/widgets/mpd_widget.lua @@ -37,7 +37,7 @@ function widget:update_widget() end local function sec_to_min(sec) - m, s = math.modf((sec or 0.0) / 60) + local m, s = math.modf((sec or 0.0) / 60) return string.format('%d:%02d', m, math.floor(s * 60)) end @@ -129,6 +129,7 @@ function widget:popup_update() self._status = status local table = self:get_info() if not self._notification then return end + if not table then return end naughty.replace_text(self._notification, table.title, table.text) end) end -- 2.48.1