Channels: Fix index out of bounds error (#3737)

このコミットが含まれているのは:
Samantaz Fox 2023-05-03 00:33:24 +02:00
コミット c1fb320094
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: F42821059186176E
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -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