Add curly: 'error'
to eslintrc and fix linting
This commit is contained in:
parent
c2be9e6f3a
commit
7c0f5a356e
5 changed files with 21 additions and 10 deletions
|
@ -46,13 +46,15 @@ InMemorySignalProtocolStore.prototype = {
|
|||
value === undefined ||
|
||||
key === null ||
|
||||
value === null
|
||||
)
|
||||
) {
|
||||
throw new Error('Tried to store undefined/null');
|
||||
}
|
||||
this.store[key] = value;
|
||||
},
|
||||
get(key, defaultValue) {
|
||||
if (key === null || key === undefined)
|
||||
if (key === null || key === undefined) {
|
||||
throw new Error('Tried to get value for undefined/null key');
|
||||
}
|
||||
if (key in this.store) {
|
||||
return this.store[key];
|
||||
}
|
||||
|
@ -60,8 +62,9 @@ InMemorySignalProtocolStore.prototype = {
|
|||
return defaultValue;
|
||||
},
|
||||
remove(key) {
|
||||
if (key === null || key === undefined)
|
||||
if (key === null || key === undefined) {
|
||||
throw new Error('Tried to remove value for undefined/null key');
|
||||
}
|
||||
delete this.store[key];
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue