Correct usage of '==' rather than '=' when checking err.code.

This commit is contained in:
Shane Kilkelly 2015-09-01 12:10:05 +01:00
parent 8bbf81f4bc
commit edc06c82e5

View file

@ -37,7 +37,7 @@ module.exports =
sourceStream = fs.createReadStream "#{location}/#{filteredName}", opts
sourceStream.on 'error', (err) ->
logger.err err:err, location:location, name:name, "Error reading from file"
if err.code = 'ENOENT'
if err.code == 'ENOENT'
callback new Errors.NotFoundError(err.message), null
else
callback err