cloudimage-responsive-utils
Advanced tools
Comparing version 2.0.14 to 2.0.15
@@ -40,2 +40,4 @@ "use strict"; | ||
function _readOnlyError(name) { throw new Error("\"" + name + "\" is read-only"); } | ||
var processReactNode = function processReactNode(props, imgNode, isUpdate, windowScreenBecomesBigger) { | ||
@@ -64,2 +66,13 @@ var lowQualityPreview = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; | ||
size = (0, _getBreakpoint.getBreakpoint)(sizes, presets); | ||
if (size) { | ||
if (size.params.src) { | ||
var _ref = (_readOnlyError("src"), (0, _getImgSrc.getImgSRC)(size.params.src, baseURL)); | ||
var _ref2 = _slicedToArray(_ref, 2); | ||
src = _ref2[0]; | ||
isSVG = _ref2[1]; | ||
} | ||
} | ||
} else { | ||
@@ -118,9 +131,9 @@ if (isUpdate && !windowScreenBecomesBigger) return; | ||
var getProps = function getProps(_ref) { | ||
var src = _ref.src, | ||
width = _ref.width, | ||
height = _ref.height, | ||
ratio = _ref.ratio, | ||
params = _ref.params, | ||
sizes = _ref.sizes; | ||
var getProps = function getProps(_ref3) { | ||
var src = _ref3.src, | ||
width = _ref3.width, | ||
height = _ref3.height, | ||
ratio = _ref3.ratio, | ||
params = _ref3.params, | ||
sizes = _ref3.sizes; | ||
return { | ||
@@ -127,0 +140,0 @@ imgNodeSRC: src || '', |
{ | ||
"name": "cloudimage-responsive-utils", | ||
"version": "2.0.14", | ||
"version": "2.0.15", | ||
"description": "cloudimage responsive utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -23,2 +23,7 @@ import { generateURL } from '../utils/generate-url'; | ||
size = getBreakpoint(sizes, presets); | ||
if(size){ | ||
if(size.params.src){ | ||
[src, isSVG] = getImgSRC(size.params.src, baseURL); | ||
} | ||
} | ||
} else { | ||
@@ -25,0 +30,0 @@ if (isUpdate && !windowScreenBecomesBigger) return; |
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
100827
2430