Comparing version 4.1.0 to 4.1.1
@@ -106,2 +106,10 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
var getImgRef = function getImgRef(img) { | ||
if (status !== 'loading') return; | ||
if ((img === null || img === void 0 ? void 0 : img.complete) && (img.naturalWidth || img.naturalHeight)) { | ||
onLoad(); | ||
} | ||
}; | ||
React.useEffect(function () { | ||
@@ -140,3 +148,4 @@ if (isCustomPlaceholder) { | ||
onError: onError, | ||
src: src | ||
src: src, | ||
ref: getImgRef | ||
})), status === 'loading' && React.createElement("div", { | ||
@@ -143,0 +152,0 @@ "aria-hidden": "true", |
@@ -124,2 +124,10 @@ "use strict"; | ||
var getImgRef = function getImgRef(img) { | ||
if (status !== 'loading') return; | ||
if ((img === null || img === void 0 ? void 0 : img.complete) && (img.naturalWidth || img.naturalHeight)) { | ||
onLoad(); | ||
} | ||
}; | ||
React.useEffect(function () { | ||
@@ -158,3 +166,4 @@ if (isCustomPlaceholder) { | ||
onError: onError, | ||
src: src | ||
src: src, | ||
ref: getImgRef | ||
})), status === 'loading' && React.createElement("div", { | ||
@@ -161,0 +170,0 @@ "aria-hidden": "true", |
{ | ||
"name": "rc-image", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "React easy to use image component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
51844
1262