added missing null check in

This commit is contained in:
Henry Oswald 2015-10-19 22:14:52 +01:00
parent a94a03fc3e
commit d80179ecc6

View file

@ -109,7 +109,7 @@ module.exports = ClsiManager =
wordCount: (project_id, file, options, callback = (error, response) ->) ->
ClsiManager._buildRequest project_id, options, (error, req) ->
compilerUrl = ClsiManager._getCompilerUrl(options?.compileGroup)
filename = file || req.compile.rootResourcePath
filename = file || req?.compile?.rootResourcePath
request.get {
url: "#{compilerUrl}/project/#{project_id}/wordcount?file=#{filename}"
}, (error, response, body) ->