conorgil / 2fa-notifier

2FA Notifier is a web extension that notifies users whether or not the sites they visit support two factor authentication (2FA).
https://2fanotifier.org
MIT License
41 stars 7 forks source link

img tag is not optional #75

Closed kenman345 closed 6 years ago

kenman345 commented 6 years ago

https://github.com/conorgil/2fa-notifier/blob/bb47c9f2a8c0143dab1720edbe39e1ad7360452a/src/typescript/utils/dataService.ts#L22

Note the value here: https://github.com/2factorauth/twofactorauth/blob/master/websites_schema.yml#L20

img tag is not an optional key. Having a question mark next to it in your code is a bit unnecessary. it should instead rely on the values/types expected from the website_schema.yml

conorgil commented 6 years ago

@kenman345 this change was intentional. See https://github.com/conorgil/2fa-notifier/commit/d5661e04d6b652280e2361a4a8e4f7ecadf7dd0d. Shout if you have better ideas about how to handle that.