summaryrefslogtreecommitdiff
path: root/luigi-template.js
diff options
context:
space:
mode:
Diffstat (limited to 'luigi-template.js')
-rw-r--r--luigi-template.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/luigi-template.js b/luigi-template.js
index cb62c71..55ecf25 100644
--- a/luigi-template.js
+++ b/luigi-template.js
@@ -77,11 +77,11 @@ LuigiTemplate = (function() {
// list of built-in filters
var FILTERS = {
uc: function(v) {
- return v.toUpperCase();
+ return (v || '').toUpperCase();
},
lc: function(v) {
- return v.toLowerCase();
+ return (v || '').toLowerCase();
},
pluralize: function(v) {
@@ -89,7 +89,7 @@ LuigiTemplate = (function() {
},
length: function(v) {
- return v.length;
+ return (v || '').length;
},
trim: function(v) {