Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gatsby-image): ensure that currentSrc exists (gatsbyjs#13287)
* Ensure that currentSrc exists Trying to read `currentSrc` before it has been set throws an `Unable to get property 'length' of undefined or null reference` error. It should be an empty string, but IE11 can return `undefined`. * Check if the `currentSrc` has a value Instead of reading the `length`, we can just check to see if it's a value. This ensures it's not `undefined` and that it has a valid `src` URL
- Loading branch information