Merge pull request #483 from lecoredump/master

Validate function before callback. Fixes #482.
This commit is contained in:
Luca CPZ 2021-02-19 10:17:43 +00:00 committed by GitHub
commit 74fc1d9d3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ local function factory(args)
function fs.update(callback) function fs.update(callback)
Gio.Async.start(gears.protected_call.call)(function() Gio.Async.start(gears.protected_call.call)(function()
update_synced() update_synced()
if callback then if type(callback) == "function" and callback then
callback() callback()
end end
end) end)