From c93f10e2c031cdff50dfc885cf8994256e8c56f2 Mon Sep 17 00:00:00 2001 From: Yongkang Chen Date: Fri, 22 May 2015 19:47:42 +0800 Subject: [PATCH] fix error of none config --- index.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.coffee b/index.coffee index fcfd3bd..88154f3 100644 --- a/index.coffee +++ b/index.coffee @@ -35,7 +35,7 @@ handleEvent = (e, cmd)-> return unless projectPath projectObj = projectDict[projectPath] - projectObj[cmd](fullPath) + projectObj[cmd]?(fullPath) reload = (projectPath)-> projectDict[projectPath]?.dispose() @@ -92,6 +92,8 @@ module.exports = return unless projectPath projectObj = projectDict[projectPath] + return unless projectObj + if fullPath == projectObj.configPath projectObj = reload(projectPath)