about summary refs log tree commit diff
path: root/src/view/lib/strings.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/lib/strings.ts')
-rw-r--r--src/view/lib/strings.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/view/lib/strings.ts b/src/view/lib/strings.ts
index 19bd5c473..e47863d50 100644
--- a/src/view/lib/strings.ts
+++ b/src/view/lib/strings.ts
@@ -96,3 +96,10 @@ export function enforceLen(str: string, len: number): string {
   }
   return str
 }
+
+export function cleanError(str: string): string {
+  if (str.startsWith('Error: ')) {
+    return str.slice('Error: '.length)
+  }
+  return str
+}