jshint compliancy
parent
ed9acf1c00
commit
d6525087c7
|
@ -201,8 +201,7 @@ define([
|
|||
}
|
||||
else if (mode === 'view') {
|
||||
secret.channel = base64ToHex(hashArray[3]);
|
||||
var keys = Crypto.createViewCryptor(hashArray[4].replace(/-/g, '/'));
|
||||
secret.keys = keys;
|
||||
secret.keys = Crypto.createViewCryptor(hashArray[4].replace(/-/g, '/'));
|
||||
if (secret.channel.length !== 32) {
|
||||
common.alert("The channel key is invalid");
|
||||
throw new Error("The channel key is invalid");
|
||||
|
|
|
@ -148,7 +148,7 @@ define([
|
|||
if (!n || !parseInt(n) || n === 0) { return ''; }
|
||||
if (n === 1) { return '; + ' + Messages.oneViewer; }
|
||||
return '; + ' + Messages._getKey('viewers', [n]);
|
||||
}
|
||||
};
|
||||
var updateUserList = function (myUserName, listElement, userList, userData, readOnly) {
|
||||
var meIdx = userList.indexOf(myUserName);
|
||||
if (meIdx === -1) {
|
||||
|
|
|
@ -275,7 +275,7 @@ define([
|
|||
};
|
||||
|
||||
var setName = module.setName = function (newName) {
|
||||
if (!(typeof(newName) === 'string')) { return; }
|
||||
if (typeof(newName) !== 'string') { return; }
|
||||
var myUserNameTemp = Cryptpad.fixHTML(newName.trim());
|
||||
if(myUserNameTemp.length > 32) {
|
||||
myUserNameTemp = myUserNameTemp.substr(0, 32);
|
||||
|
@ -673,7 +673,7 @@ define([
|
|||
if (typeof(lastName) === 'string' && lastName.length) {
|
||||
setName(lastName);
|
||||
}
|
||||
onLocal();
|
||||
realtimeOptions.onLocal();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue