forked from mystiq/hydrogen-web
dont use lookbehind in regular expressions, safari & older firefoxes choke on them
This commit is contained in:
parent
c87628b614
commit
c8b0354d07
2 changed files with 3 additions and 1 deletions
|
@ -8,3 +8,5 @@
|
|||
otherwise it becomes hard to remember what was a default/named export
|
||||
- should we return promises from storage mutation calls? probably not, as we don't await them anywhere. only read calls should return promises?
|
||||
- we don't anymore
|
||||
- don't use these features, as they are not widely enough supported.
|
||||
- [lookbehind in regular expressions](https://caniuse.com/js-regexp-lookbehind)
|
||||
|
|
|
@ -163,7 +163,7 @@ export class Platform {
|
|||
// Make sure that loginToken does not end up in the logs
|
||||
const transformer = (item) => {
|
||||
if (item.e?.stack) {
|
||||
item.e.stack = item.e.stack.replace(/(?<=\/\?loginToken=).+/, "<snip>");
|
||||
item.e.stack = item.e.stack.replace(/(?<=\/\?loginToken=).+/, "?loginToken=<snip>");
|
||||
}
|
||||
return item;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue