feature: support toLiquid, working on #81

This commit is contained in:
harttle
2018-08-14 00:11:50 +08:00
committed by Jun Yang
parent 5b43520d78
commit 7a3689067b
5 changed files with 29 additions and 2 deletions
+3
View File
@@ -63,7 +63,10 @@ var Scope = {
} else {
if (typeof obj.to_liquid === 'function') {
obj = obj.to_liquid()
} else if (typeof obj.toLiquid === 'function') {
obj = obj.toLiquid()
}
if (key === 'size' && (_.isArray(obj) || _.isString(obj))) {
val = obj.length
} else {