client: fix jserror

This commit is contained in:
fantasticit 2022-06-12 15:49:07 +08:00
parent e3fd5efb49
commit e50b81cb4f
1 changed files with 3 additions and 3 deletions

View File

@ -57,12 +57,12 @@ export const Resizeable: React.FC<IProps> = ({
const $bottomRight = useRef<HTMLDivElement>(null);
useClickOutside($container, {
in: () => $container.current.classList.add(styles.isActive),
out: () => $container.current.classList.remove(styles.isActive),
in: () => $container.current && $container.current.classList.add(styles.isActive),
out: () => $container.current && $container.current.classList.remove(styles.isActive),
});
useEffect(() => {
if (!isEditable) return;
if (!isEditable || !$container.current) return;
interact($container.current).resizable({
edges: {