Merge pull request #893 from workadventure-xce/fix/first_login
Fix first login with empty local storage
This commit is contained in:
commit
4bbfd4f12f
@ -14,8 +14,8 @@ export function isUserNameValid(value: string): boolean {
|
|||||||
return regexp.test(value);
|
return regexp.test(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function areCharacterLayersValid(value: string[]): boolean {
|
export function areCharacterLayersValid(value: string[] | null): boolean {
|
||||||
if (!value.length) return false;
|
if (!value || !value.length) return false;
|
||||||
for (let i = 0; i < value.length; i++) {
|
for (let i = 0; i < value.length; i++) {
|
||||||
if (/^\w+$/.exec(value[i]) === null) {
|
if (/^\w+$/.exec(value[i]) === null) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user