Fix isDesiredNameMessage not working for undefined desiredName
This commit is contained in:
parent
efc59f871b
commit
221ed4fcc3
1 changed files with 1 additions and 1 deletions
|
@ -186,7 +186,7 @@ export function isDesiredNameMessage(obj: unknown): obj is DesiredNameMessage {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
!Object.hasOwnProperty.call(obj, "desiredName") ||
|
Object.hasOwnProperty.call(obj, "desiredName") &&
|
||||||
typeof (obj as ServerMessage & { desiredName: unknown }).desiredName !==
|
typeof (obj as ServerMessage & { desiredName: unknown }).desiredName !==
|
||||||
"string"
|
"string"
|
||||||
) {
|
) {
|
||||||
|
|
Reference in a new issue