From: ikselven Date: Wed, 17 Aug 2016 11:52:47 +0000 (+0200) Subject: fix: attempt to index a nil value (field 'n_perc') X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/10cb9a91278976aa2506f0cdd73376a6ce0da510?ds=sidebyside;hp=-c fix: attempt to index a nil value (field 'n_perc') --- 10cb9a91278976aa2506f0cdd73376a6ce0da510 diff --git a/widgets/bat.lua b/widgets/bat.lua index e43875f..9ab0cdc 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -62,6 +62,7 @@ local function worker(args) } bat_now.n_status = {} + bat_now.n_perc = {} for i = 1, #batteries do bat_now.n_status[i] = "N/A" bat_now.n_perc[i] = 0