select.lua: fix some incorrect boolean values in the property menu
`false` value in the `value or mp.get_property_native(property)` expression will trigger `mp.get_property_native`, but some sub-properties cannot be accessed directly, the obtained value is nil.
This commit is contained in:
1 parent
b955aa28f3
commit
9f9f8c4dd4
1 file changed
+3
-1
@@ -637,7 +637,9 @@ mp.add_key_binding(nil, "select-binding", function (t)
|
||||
end, { complex = true })
|
||||
|
||||
local function add_property(properties, property, value)
|
||||
value = value or mp.get_property_native(property)
|
||||
if value == nil then
|
||||
value = mp.get_property_native(property)
|
||||
end
|
||||
|
||||
if type(value) == "table" and next(value) then
|
||||
if type(next(value)) == "number" then
|
||||
|
||||
Reference in new issue
Block a user