fix: time can be nil when creating chapter menu (#243)
This commit is contained in:

committed by
GitHub

parent
1df7a47005
commit
bbe32ba65a
@@ -4390,6 +4390,7 @@ mp.add_key_binding(nil, 'chapters', create_self_updating_menu_opener({
|
||||
}
|
||||
items[#items + 1] = item
|
||||
end
|
||||
if not state.time then return items end
|
||||
for index = #items, 1, -1 do
|
||||
if state.time >= items[index].value then
|
||||
items[index].active = true
|
||||
|
Reference in New Issue
Block a user