Fix extension

This commit is contained in:
Nathan Bierema 2021-10-04 22:10:23 -04:00
parent 70a646aedb
commit b3f8da548c
2 changed files with 6 additions and 3 deletions

View File

@ -212,7 +212,10 @@ function tryCatch<S, A extends Action<unknown>>(
try { try {
return fn(args); return fn(args);
} catch (err) { } catch (err) {
if (err.message === 'Message length exceeded maximum allowed length.') { if (
(err as Error).message ===
'Message length exceeded maximum allowed length.'
) {
const instanceId = (args as any).instanceId; const instanceId = (args as any).instanceId;
const newArgs = { const newArgs = {
split: 'start', split: 'start',

View File

@ -397,7 +397,7 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<unknown>>(
toContentScript( toContentScript(
{ {
type: 'ERROR', type: 'ERROR',
payload: e.message, payload: (e as Error).message,
source, source,
instanceId, instanceId,
}, },
@ -417,7 +417,7 @@ function __REDUX_DEVTOOLS_EXTENSION__<S, A extends Action<unknown>>(
toContentScript( toContentScript(
{ {
type: 'ERROR', type: 'ERROR',
payload: e.message, payload: (e as Error).message,
source, source,
instanceId, instanceId,
}, },