Skip to content

Commit 249dfc4

Browse files
committed
fixing function and lint
1 parent d91fe7c commit 249dfc4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dash/dash-renderer/src/wrapper/ExternalWrapper.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ type Props = {
1818
/**
1919
* For rendering components that are out of the regular layout tree.
2020
*/
21-
function ExternalWrapper({component, componentPath}: Props, temp?: boolean = false) {
21+
function ExternalWrapper({
22+
component,
23+
componentPath,
24+
temp = false
25+
}: Props & {temp?: boolean}) {
2226
const dispatch: any = useDispatch();
2327
const [inserted, setInserted] = useState(false);
2428

@@ -33,7 +37,9 @@ function ExternalWrapper({component, componentPath}: Props, temp?: boolean = fal
3337
);
3438
setInserted(true);
3539
return () => {
36-
if (temp) dispatch(removeComponent({componentPath}));
40+
if (temp) {
41+
dispatch(removeComponent({componentPath}));
42+
}
3743
};
3844
}, []);
3945

0 commit comments

Comments
 (0)