mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
Fix error line substring bug in JellyfinAPI class
This commit is contained in:
@@ -65,7 +65,7 @@ class JellyfinAPI {
|
||||
if (line.trim().startsWith("at")) {
|
||||
const errorLine = line.trim();
|
||||
const startSubstring = errorLine.lastIndexOf("\\") == -1 ? errorLine.indexOf("(") + 1 : errorLine.lastIndexOf("\\") + 1;
|
||||
const endSubstring = errorLine.lastIndexOf(")") == -1 ? errorLine.length : errorLine.lastIndexOf(")") - 1;
|
||||
const endSubstring = errorLine.lastIndexOf(")") == -1 ? errorLine.length : errorLine.lastIndexOf(")");
|
||||
const lineNumber = errorLine.substring(startSubstring, endSubstring);
|
||||
errorLines.push({ TraceIndex: index, line: lineNumber });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user