Remove global flag
Regular expression objects are stateful, and the global flag interferes badly with the expression. A valid call can cause it to act like a flip flop instead of a stateless test.
This commit is contained in:
parent
8592e76e12
commit
576bfedfb5
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ import { _t } from './languageHandler';
|
||||||
|
|
||||||
// Regex for what a "safe" or "Matrix-looking" localpart would be.
|
// Regex for what a "safe" or "Matrix-looking" localpart would be.
|
||||||
// TODO: Update as needed for https://github.com/matrix-org/matrix-doc/issues/1514
|
// TODO: Update as needed for https://github.com/matrix-org/matrix-doc/issues/1514
|
||||||
export const SAFE_LOCALPART_REGEX = /^[a-z0-9=_\-./]+$/g;
|
export const SAFE_LOCALPART_REGEX = /^[a-z0-9=_\-./]+$/;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts either the ILAG or full registration flow, depending
|
* Starts either the ILAG or full registration flow, depending
|
||||||
|
|
Loading…
Reference in a new issue