SEO.props define several properties as being optional with ?. This extends their accepted types with undefined.
However, in multiple places in the code base, an improper check is made that expects the value to be null.
In JavaScript and TypeScript, null and undefined are two completely different values.
This ensures that no matter the value, checks are appropriately made. This was particularly apparent with the generation of invalid og:image:alt and og:image:height tags if no values were passed to the component.
SEO.props
define several properties as being optional with?
. This extends their accepted types withundefined
.However, in multiple places in the code base, an improper check is made that expects the value to be
null
.In JavaScript and TypeScript,
null
andundefined
are two completely different values.This ensures that no matter the value, checks are appropriately made. This was particularly apparent with the generation of invalid
og:image:alt
andog:image:height
tags if no values were passed to the component.