aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/DillerDao.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DillerDao.js b/src/DillerDao.js
index fa27aa1..e372841 100644
--- a/src/DillerDao.js
+++ b/src/DillerDao.js
@@ -32,7 +32,8 @@ function DillerDao(tx) {
var fields = _(attributes).chain()
.map(function (value, attribute) {
if (attribute == 'name' || attribute == 'description') {
- values.push(value);
+ value = (value || '').trim();
+ values.push(value.length > 0 ? value : null);
return attribute + ' = $' + i++;
}
})