@@ -1,6 +1,6 @@
{
"name": "react-photo-view",
- "version": "0.3.2",
+ "version": "0.3.4",
"description": "React photo preview.",
"author": "MinJieLiu",
"license": "MIT",
@@ -42,7 +42,7 @@ export default function VisibleAnimationHandle({
return;
}
const originRef = currentImage.originRef;
- if (originRef) {
+ if (originRef && originRef.nodeType === 1) {
// 获取触发时节点位置
const { top, left, width, height } = originRef.getBoundingClientRect();
updateOriginRect({