Checklist
Description
There is TypeError in JavaScript code that is responsible for parsing favourite icons (favicons). Practically, method getAttribute returns null if an element doesn't have the requested attribute, according to the MDN documentation.
One of such cases is the usage of link in microdata. In particular, such links might have only two attributes
href and itemprop, according to the Schema.org. Hence, the presence of such links leads to TypeError in JavaScript and breaks the execution of scripts. The message of the error is "null is not an object (evaluating 'nodeList[i].getAttribute('rel').startsWith')"
Expected Behavior
JS script should not throw any TypeErrors if a link element doesn't have rel attribute
Actual Behavior
JS script should take into account link elements that don't have rel attribute.
Steps to Reproduce
- Open the url of page that contains links with no rel attribute
- Check logs in console
Screenshots and Videos
Environment
Device: iPhone 12
iOS version: 17.5
App version: 12.1.1
Checklist
Description
There is TypeError in JavaScript code that is responsible for parsing favourite icons (favicons). Practically, method
getAttributereturnsnullif an element doesn't have the requested attribute, according to the MDN documentation.One of such cases is the usage of
linkin microdata. In particular, such links might have only two attributeshrefanditemprop, according to the Schema.org. Hence, the presence of such links leads to TypeError in JavaScript and breaks the execution of scripts. The message of the error is "null is not an object (evaluating 'nodeList[i].getAttribute('rel').startsWith')"Expected Behavior
JS script should not throw any TypeErrors if a link element doesn't have rel attribute
Actual Behavior
JS script should take into account link elements that don't have rel attribute.
Steps to Reproduce
Screenshots and Videos
Environment
Device:
iPhone 12iOS version:
17.5App version:
12.1.1