pb-sxp-ui 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9080,7 +9080,7 @@ var ExpandableText$1 = memo(ExpandableText);
9080
9080
 
9081
9081
  const FormatImage = forwardRef((props, ref) => {
9082
9082
  const { src, onLoad, style, className, loading, alt = 'image' } = props;
9083
- const [imgSrc, setImgSrc] = useState();
9083
+ const [imgSrc, setImgSrc] = useState(src);
9084
9084
  const imgRef = useRef(null);
9085
9085
  const [visible, setVisible] = useState(false);
9086
9086
  useImperativeHandle(ref, () => ({
@@ -9106,7 +9106,7 @@ const FormatImage = forwardRef((props, ref) => {
9106
9106
  };
9107
9107
  }, [src, visible]);
9108
9108
  return (React.createElement(React.Fragment, null,
9109
- !visible && React.createElement("div", { style: { width: '100%', height: '100%', zIndex: 1, backgroundColor: '#fff' } }),
9109
+ !visible && !imgSrc && React.createElement("div", { style: { width: '100%', height: '100%', zIndex: 1, backgroundColor: '#fff' } }),
9110
9110
  (imgSrc === null || imgSrc === void 0 ? void 0 : imgSrc.includes('.avif')) ? (React.createElement("picture", null,
9111
9111
  React.createElement("source", { type: 'image/avif', srcSet: imgSrc }),
9112
9112
  React.createElement("source", { type: 'image/webp', srcSet: `${imgSrc}?imageMogr2/format/webp` }),