options.lua: avoid unnecessary on_update calls

The script was set up to only call on_update when the changelist
was non-empty. However, since the size operator does not operate
on dicts, it always returned 0 (which is truthy), thus on_update
would always be called when the script-opts property changed.
This commit is contained in:
Oscar Manglaras 2020-01-28 00:37:02 +10:30 committed by sfan5
parent a2eee88ccc
commit c99cc13526
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ local function read_options(options, identifier, on_update)
end
end
last_opts = new_opts
if #changelist then
if next(changelist) ~= nil then
on_update(changelist)
end
end)