mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Channels: Fix index out of bounds error (#3737)
This commit is contained in:
commit
c1fb320094
1 changed files with 1 additions and 1 deletions
|
@ -604,7 +604,7 @@ def text_to_parsed_content(text : String) : JSON::Any
|
|||
currentNode = {"text" => urlMatch[0], "navigationEndpoint" => {"urlEndpoint" => {"url" => urlMatch[0]}}}
|
||||
currentNodes << (JSON.parse(currentNode.to_json))
|
||||
# If text remain after match create new simple node with text after match
|
||||
afterNode = {"text" => splittedLastNode.size > 0 ? splittedLastNode[1] : ""}
|
||||
afterNode = {"text" => splittedLastNode.size > 1 ? splittedLastNode[1] : ""}
|
||||
currentNodes << (JSON.parse(afterNode.to_json))
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue