Remove optimization that caused scrubbing misbehavior

This commit is contained in:
Dermot Duffy
2024-08-26 20:55:02 -07:00
parent 5ad957f465
commit 8344734e2b
3 changed files with 8 additions and 9 deletions
+4 -2
View File
@@ -105,13 +105,15 @@ export function contentsChanged(
* @param func The Console func to call.
*/
export function errorToConsole(
e: Error | { message: unknown },
e: Error | { message: unknown } | string,
func: CallableFunction = console.warn,
): void {
if (e instanceof FrigateCardError && e.context) {
func(e, e.context);
} else {
} else if (typeof e === 'object' && 'message' in e) {
func(e.message);
} else {
func(e);
}
}