Skip to content

Commit

Permalink
Validate function before callback. Fixes #482
Browse files Browse the repository at this point in the history
  • Loading branch information
lecoredump committed Jan 13, 2021
1 parent b38c6d6 commit c782f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widget/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ local function factory(args)
function fs.update(callback)
Gio.Async.start(gears.protected_call.call)(function()
update_synced()
if callback then
if type(callback) == "function" and callback then
callback()
end
end)
Expand Down

0 comments on commit c782f7d

Please sign in to comment.