diff options
author | Oscar Manglaras <57207260+CogentRedTester@users.noreply.github.com> | 2020-01-28 00:37:02 +1030 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-02-06 22:57:53 +0100 |
commit | c99cc13526a8b35f120d70e57e44d2b8dd46d400 (patch) | |
tree | 4ac826b74528f78aead6542bfb136a4a40cbe9ea /player/lua/options.lua | |
parent | a2eee88ccc5c858c7d38cd781b5a6e31c53a9963 (diff) | |
download | mpv-c99cc13526a8b35f120d70e57e44d2b8dd46d400.tar.bz2 mpv-c99cc13526a8b35f120d70e57e44d2b8dd46d400.tar.xz |
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.
Diffstat (limited to 'player/lua/options.lua')
-rw-r--r-- | player/lua/options.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/lua/options.lua b/player/lua/options.lua index 31580f8320..c3039196be 100644 --- a/player/lua/options.lua +++ b/player/lua/options.lua @@ -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) |