This commit is contained in:
harttle
2017-04-20 10:33:49 +08:00
parent 1126dffd7d
commit 82f84d96c1
3 changed files with 7 additions and 5 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
var strftime = require('./src/util/strftime.js');
var _ = require('./src/util/underscore.js');
var isTruthy = require('./src/syntax.js').isTruthy;
var escapeMap = {
'&': '&',
@@ -37,7 +38,7 @@ var filters = {
return v instanceof Date ? strftime(v, arg) : '';
},
'default': function _default(v, arg) {
return v || arg;
return isTruthy(v) ? v : arg;
},
'divided_by': function divided_by(v, arg) {
return Math.floor(v / arg);
@@ -203,7 +204,7 @@ function registerAll(liquid) {
registerAll.filters = filters;
module.exports = registerAll;
},{"./src/util/strftime.js":20,"./src/util/underscore.js":21}],2:[function(require,module,exports){
},{"./src/syntax.js":13,"./src/util/strftime.js":20,"./src/util/underscore.js":21}],2:[function(require,module,exports){
'use strict';
var Scope = require('./src/scope');
+3 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "shopify-liquid",
"version": "1.7.8",
"version": "1.7.9",
"description": "A feature-rich Liquid template engine for Node.js and browsers, with compliance with the Ruby version.",
"main": "index.js",
"scripts": {