Просмотр исходного кода

Merge pull request #1466 from porter-dev/fix/folder-path-not-setting-when-procfile-selected

[BUGFIX] Add folder path if it does not exists when procfile selected
Nicolas Frati 4 лет назад
Родитель
Сommit
7cee2f7155
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      dashboard/src/components/repo-selector/ContentsList.tsx

+ 6 - 0
dashboard/src/components/repo-selector/ContentsList.tsx

@@ -317,6 +317,12 @@ export default class ContentsList extends Component<PropsType, StateType> {
                 <Row
                   key={i}
                   onClick={() => {
+                    if (
+                      !this.props.folderPath ||
+                      this.props.folderPath === ""
+                    ) {
+                      this.props.setFolderPath("./");
+                    }
                     this.props.setProcfileProcess(process);
                   }}
                   isLast={processes.length - 1 === i}