From 7156a6e9a958e922f513a5e60d361eb0300f9bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Guimar=C3=A3es?= Date: Wed, 21 Dec 2016 13:12:38 +0000 Subject: [PATCH] :bug: Fix validation (#105) --- CHANGELOG.md | 6 ++++++ src/index.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42fc14d..25a4bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.3.41] - 2016-12-21 + +### Fixed + +- Fix `Add project folder` validation issues ([#105](https://github.com/jccguimaraes/atom-project-viewer/issues/105)) + ## [0.3.40] - 2016-12-21 ### Added diff --git a/src/index.js b/src/index.js index e722c55..8b727fc 100644 --- a/src/index.js +++ b/src/index.js @@ -672,8 +672,9 @@ const projectViewer = { this.disposables.add( atom.project.onDidChangePaths((paths) => { const selectedModel = _utility.getSelectedProjectModel(); - const type = selectedModel.type; if (!selectedModel) { return; } + const type = selectedModel.type; + if (!type) { return; } const selectedPaths = selectedModel[type + 'Paths']; const changes = { name: selectedModel[type + 'Name'],