Skip to content

Commit

Permalink
fix: reverse negated condition
Browse files Browse the repository at this point in the history
  • Loading branch information
thebiggianthead committed Dec 4, 2024
1 parent 5b6023f commit bb0d315
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ImageHotspotArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ export function ImageHotspotArray(
* check if there are any changes to the hotspotImage and update the reference
*/
const hotspotImage = useMemo(() => {
return (!imageHotspotOptions.imagePath ? rootObject : get(rootObject, imageHotspotOptions.imagePath)) as ImageValue | undefined
return (
imageHotspotOptions.imagePath ? get(rootObject, imageHotspotOptions.imagePath) : rootObject
) as ImageValue | undefined
}, [rootObject, imageHotspotOptions.imagePath])

const displayImage = useMemo(() => {
Expand Down

0 comments on commit bb0d315

Please sign in to comment.