Skip to content

Commit 791db38

Browse files
committed
avoid unnecessary returns
1 parent 916cd94 commit 791db38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ const CSS = 'position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1p
33
export default (element, handler) => {
44
let frame = document.createElement('iframe');
55
frame.style.cssText = CSS;
6-
frame.onload = () => frame.contentWindow.onresize = () => handler(element);
6+
frame.onload = () => {
7+
frame.contentWindow.onresize = () => {
8+
handler(element);
9+
};
10+
};
711
element.appendChild(frame);
812
return frame;
913
}

0 commit comments

Comments
 (0)