Add eqeqeq rule but require == for null
This commit is contained in:
parent
64a4d2e717
commit
0086216c9d
30 changed files with 64 additions and 63 deletions
|
@ -19,7 +19,7 @@ export class Address {
|
|||
|
||||
public static parse(value: string): Address {
|
||||
const match = value.match(ADDRESS_REGEXP);
|
||||
strictAssert(match !== null, `Invalid Address: ${value}`);
|
||||
strictAssert(match != null, `Invalid Address: ${value}`);
|
||||
const [whole, uuid, deviceId] = match;
|
||||
strictAssert(whole === value, 'Integrity check');
|
||||
return Address.create(uuid, parseInt(deviceId, 10));
|
||||
|
|
|
@ -39,7 +39,7 @@ export class QualifiedAddress {
|
|||
|
||||
public static parse(value: string): QualifiedAddress {
|
||||
const match = value.match(QUALIFIED_ADDRESS_REGEXP);
|
||||
strictAssert(match !== null, `Invalid QualifiedAddress: ${value}`);
|
||||
strictAssert(match != null, `Invalid QualifiedAddress: ${value}`);
|
||||
const [whole, ourUuid, uuid, deviceId] = match;
|
||||
strictAssert(whole === value, 'Integrity check');
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ async function downloadSticker(
|
|||
{ ephemeral }: { ephemeral?: boolean } = {}
|
||||
): Promise<Omit<StickerFromDBType, 'isCoverOnly'>> {
|
||||
const { id, emoji } = proto;
|
||||
strictAssert(id !== undefined && id !== null, "Sticker id can't be null");
|
||||
strictAssert(id != null, "Sticker id can't be null");
|
||||
|
||||
const { messaging } = window.textsecure;
|
||||
if (!messaging) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue