mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 13:32:16 +00:00
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:
parent
a2eee88ccc
commit
c99cc13526
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user