fix(log): Replace unknown js location with webview::unknown, fixes #41 (#338)

This commit is contained in:
Fabian-Lars
2023-04-30 17:02:25 +02:00
committed by GitHub
parent 8de442113f
commit d02432df06
2 changed files with 10 additions and 5 deletions
+6 -1
View File
@@ -52,10 +52,15 @@ async function log(
const { file, line, ...keyValues } = options ?? {};
let location = filtered?.[0]?.filter((v) => v.length > 0).join("@");
if (location === "Error") {
location = "webview::unknown";
}
await invoke("plugin:log|log", {
level,
message,
location: filtered?.[0]?.filter((v) => v.length > 0).join("@"),
location,
file,
line,
keyValues,