Fixed Bug 57984: Tapping on folder title after canceling creation of form from file leads to an error

This commit is contained in:
Ilya Oleshko 2022-07-05 16:30:59 +03:00
parent c7b556131e
commit 4d62881a3c
2 changed files with 8 additions and 6 deletions

View File

@ -98,7 +98,7 @@ class SelectFolderDialog extends React.Component {
componentWillUnmount() { componentWillUnmount() {
const { setFolderTitle, setProviderKey, setFolderId } = this.props; const { setFolderTitle, setProviderKey, setFolderId } = this.props;
console.log("componentWillUnmount"); //console.log("componentWillUnmount");
if (this.throttledResize) { if (this.throttledResize) {
this.throttledResize && this.throttledResize.cancel(); this.throttledResize && this.throttledResize.cancel();

View File

@ -483,14 +483,16 @@ export default inject(
const { toggleIsVisible, isVisible } = auth.infoPanelStore; const { toggleIsVisible, isVisible } = auth.infoPanelStore;
const { title, id, pathParts, navigationPath } = selectedFolderStore;
return { return {
showText: auth.settingsStore.showText, showText: auth.settingsStore.showText,
isDesktop: auth.settingsStore.isDesktopClient, isDesktop: auth.settingsStore.isDesktopClient,
isRootFolder: selectedFolderStore.parentId === 0, isRootFolder: pathParts?.length === 1,
title: selectedFolderStore.title, title,
currentFolderId: selectedFolderStore.id, currentFolderId: id,
pathParts: selectedFolderStore.pathParts, pathParts: pathParts,
navigationPath: selectedFolderStore.navigationPath, navigationPath: navigationPath,
canCreate, canCreate,
toggleInfoPanel: toggleIsVisible, toggleInfoPanel: toggleIsVisible,
isInfoPanelVisible: isVisible, isInfoPanelVisible: isVisible,