protecting against blank outputs
This commit is contained in:
parent
ae469f2028
commit
12dc5b82cc
1 changed files with 3 additions and 2 deletions
|
|
@ -344,6 +344,7 @@ def get_python_traceback(output: str) -> str:
|
|||
|
||||
def get_javascript_traceback(output: str) -> str:
|
||||
lines = output.splitlines("\n")
|
||||
first_line = lines[0].split(": ")
|
||||
if len(lines) > 0 and len(first_line[0]) > 0 and "at" in lines[1].lstrip():
|
||||
if len(lines) == 0:
|
||||
first_line = lines[0].split(": ")
|
||||
if len(lines) > 1 and len(first_line) > 0 and len(first_line[0]) > 0 and "at" in lines[1].lstrip():
|
||||
return output
|
||||
Loading…
Add table
Reference in a new issue