@crystallize/react-image
Advanced tools
Comparing version 3.0.0-beta.5 to 3.0.0-beta.6
@@ -68,6 +68,6 @@ "use strict"; | ||
var std = variants.filter(function (v) { | ||
return !v.url.endsWith(".webp"); | ||
return v.url && !v.url.endsWith(".webp"); | ||
}); | ||
var webp = variants.filter(function (v) { | ||
return v.url.endsWith(".webp"); | ||
return v.url && v.url.endsWith(".webp"); | ||
}); | ||
@@ -74,0 +74,0 @@ var srcSet = std.map(getVariantSrc).join(", "); |
@@ -0,1 +1,7 @@ | ||
## 3.0.0-beta.6 (2019-07-24) | ||
* Don't break if url is not present on a variant ([1d3b679](https://github.com/CrystallizeAPI/react-image/commit/1d3b679)) | ||
## 3.0.0-beta.5 (2019-07-24) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "@crystallize/react-image", | ||
"description": "A React package to output an image with different source variations from Crystallize", | ||
"version": "3.0.0-beta.5", | ||
"version": "3.0.0-beta.6", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -34,4 +34,4 @@ import React from "react"; | ||
// Determine srcSet | ||
const std = variants.filter(v => !v.url.endsWith(".webp")); | ||
const webp = variants.filter(v => v.url.endsWith(".webp")); | ||
const std = variants.filter(v => v.url && !v.url.endsWith(".webp")); | ||
const webp = variants.filter(v => v.url && v.url.endsWith(".webp")); | ||
const srcSet = std.map(getVariantSrc).join(", "); | ||
@@ -38,0 +38,0 @@ const srcSetWebp = webp.map(getVariantSrc).join(", "); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24878716