|
String.prototype.replaceAll = function (search, replacement) { |
Errors like
SyntaxError: Invalid regular expression: /*/g: Nothing to repeat have been reported in the app. Some regex patterns are not being applied correctly because the global replacement is affecting the entire execution. To fix this, we need to import the package dynamically:
const originalStringReplaceAll = String.prototype.replaceAll;
const tnefModule = await import('node-tnef');
String.prototype.replaceAll = originalStringReplaceAll;
const tnef = tnefModule.default || tnefModule;
node-tnef/src/bin/util.js
Line 1 in bb3ff4c
Errors like
SyntaxError: Invalid regular expression: /*/g: Nothing to repeathave been reported in the app. Some regex patterns are not being applied correctly because the global replacement is affecting the entire execution. To fix this, we need to import the package dynamically: