1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Fix unsafe negation.

https://eslint.org/docs/rules/no-unsafe-negation
This commit is contained in:
Antonin Décimo 2020-05-10 21:18:10 +02:00 committed by Juliusz Chroboczek
parent 1064c4a47b
commit 38a341de95

View file

@ -691,7 +691,7 @@ function addUser(id, name) {
function delUser(id, name) {
if(!name)
name = null;
if(!id in users)
if(!(id in users))
throw new Error('Unknown user id');
if(users[id] !== name)
throw new Error('Inconsistent user name');