mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-04 02:37:46 +02:00
⚡ Restore is not a function error
This commit is contained in:
parent
e4652e164f
commit
ad9f22857d
|
|
@ -309,6 +309,19 @@ export class Expression {
|
|||
) {
|
||||
throw new Error('invalid syntax');
|
||||
}
|
||||
|
||||
if (
|
||||
typeof process === 'undefined' &&
|
||||
error instanceof Error &&
|
||||
error.name === 'TypeError' &&
|
||||
error.message.endsWith('is not a function')
|
||||
) {
|
||||
const match = error.message.match(/(?<msg>[^.]+is not a function)/);
|
||||
|
||||
if (!match?.groups?.msg) return null;
|
||||
|
||||
throw new Error(match.groups.msg);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user