Skip to content

Commit

Permalink
fix: can't set iframe's width or height individually in crust (#583)
Browse files Browse the repository at this point in the history
fix iframesize in crust
  • Loading branch information
KaWaite committed Mar 27, 2023
1 parent 988d1a8 commit 3494b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Crust/Plugins/PluginFrame/IFrame/hooks.ts
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 3494b4d

Please sign in to comment.