Akjava commited on
Commit
cbd8984
1 Parent(s): ca4ddc8
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -104,7 +104,9 @@ function update_tts_texts(text){
104
  const new_texts = []
105
  //const splited = replaced_text.split(/[.!?]+\s*/);
106
  const splited = replaced_text.match(/[^.?!,]+[.?!,]+\s?/g);
107
-
 
 
108
  for (let i = 0; i < splited.length; i++) {
109
  const value = splited[i].trim();
110
 
 
104
  const new_texts = []
105
  //const splited = replaced_text.split(/[.!?]+\s*/);
106
  const splited = replaced_text.match(/[^.?!,]+[.?!,]+\s?/g);
107
+ if(!splited){
108
+ return
109
+ }
110
  for (let i = 0; i < splited.length; i++) {
111
  const value = splited[i].trim();
112