Skip to content

Commit

Permalink
fix image display on url with query params
Browse files Browse the repository at this point in the history
  • Loading branch information
tk04 committed Apr 3, 2024
1 parent a82a21e commit 5396c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Editor/NodeViews/Image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const ImageView: React.FC<props> = ({
updateAssetSrc();
}

const ext: string = node.attrs.src.split(".").pop();
const ext: string = node.attrs.src.split("?")[0].split(".").pop();
setIsImage(imageExtensions.includes(ext.toLowerCase()));
}, [node.attrs.src]);

Expand Down

0 comments on commit 5396c34

Please sign in to comment.