mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Add eqeqeq rule but require == for null
This commit is contained in:
@@ -293,7 +293,7 @@ class Message {
|
||||
throw new Error('Invalid timestamp');
|
||||
}
|
||||
|
||||
if (this.expireTimer !== undefined && this.expireTimer !== null) {
|
||||
if (this.expireTimer != null) {
|
||||
if (typeof this.expireTimer !== 'number' || !(this.expireTimer >= 0)) {
|
||||
throw new Error('Invalid expireTimer');
|
||||
}
|
||||
@@ -311,8 +311,8 @@ class Message {
|
||||
}
|
||||
if (this.isEndSession()) {
|
||||
if (
|
||||
this.body !== null ||
|
||||
this.group !== null ||
|
||||
this.body != null ||
|
||||
this.group != null ||
|
||||
this.attachments.length !== 0
|
||||
) {
|
||||
throw new Error('Invalid end session message');
|
||||
@@ -674,7 +674,7 @@ export default class MessageSender {
|
||||
>
|
||||
): Promise<Proto.IAttachmentPointer> {
|
||||
assert(
|
||||
typeof attachment === 'object' && attachment !== null,
|
||||
typeof attachment === 'object' && attachment != null,
|
||||
'Got null attachment in `makeAttachmentPointer`'
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user