mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-22 16:19:53 +05:30
Fix arg_array on empty
This commit is contained in:
parent
0438572c58
commit
172fc72fa9
@ -428,9 +428,13 @@ def number_with_separator(number)
|
||||
end
|
||||
|
||||
def arg_array(array, start = 1)
|
||||
args = [] of String
|
||||
(start..array.size + start - 1).each { |i| args << "($#{i})" }
|
||||
args = args.join(",")
|
||||
if array.size == 0
|
||||
args = "NULL"
|
||||
else
|
||||
args = [] of String
|
||||
(start..array.size + start - 1).each { |i| args << "($#{i})" }
|
||||
args = args.join(",")
|
||||
end
|
||||
|
||||
return args
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user