Skip to content

Commit

Permalink
fix: make iframe width or height assignable without the other (#403)
Browse files Browse the repository at this point in the history
make width or height assignable without the other
  • Loading branch information
KaWaite authored Jan 25, 2023
1 parent bab9e62 commit e8647af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/atoms/Plugin/IFrame/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default function useHook({
useEffect(() => {
const w = typeof width === "number" ? width + "px" : width;
const h = typeof height === "number" ? height + "px" : height;
setIFrameSize(w && h ? [w, h] : undefined);
setIFrameSize(w || h ? [w, h] : undefined);
}, [width, height]);

return {
Expand Down

0 comments on commit e8647af

Please sign in to comment.