fix(database): Do not send empty error JSON

This commit is contained in:
Ben Gotow 2015-07-02 19:24:43 +02:00
parent 9542d1179e
commit 72dd3171ad

View file

@ -72,7 +72,7 @@ class DatabaseManager
return return
@_query db, query, values, (err, result) -> @_query db, query, values, (err, result) ->
errJSONString = JSON.stringify(err) errJSONString = if err then JSON.stringify(err) else null
event.sender.send('database-result', {queryKey, errJSONString, result}) event.sender.send('database-result', {queryKey, errJSONString, result})
# Resolves when a new database has been created and the initial setup # Resolves when a new database has been created and the initial setup