velocityjs
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -0,1 +1,5 @@ | ||
## 0.7.2 | ||
- fix: merge [52](https://github.com/shepherdwind/velocity.js/pull/52) | ||
## 0.7.1 | ||
@@ -2,0 +6,0 @@ |
{ | ||
"name": "velocityjs", | ||
"description": "Velocity Template Language(VTL) for JavaScript", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "velocity template" |
@@ -273,5 +273,7 @@ module.exports = function(Velocity, utils) { | ||
baseRef.eval = function() { | ||
return that.eval.apply(that, arguments); | ||
}; | ||
if(typeof baseRef === 'object' && baseRef){ | ||
baseRef.eval = function() { | ||
return that.eval.apply(that, arguments); | ||
}; | ||
} | ||
@@ -278,0 +280,0 @@ try { |
@@ -209,3 +209,17 @@ 'use strict'; | ||
}) | ||
it('set equal to result of method ', function () { | ||
var vm = "#set( $monkey = 'monica' ) ## string literal\n" + | ||
'#set( $result = $monkey.substring(1) ) ##calling method' | ||
assert.equal("monica", getContext(vm).monkey) | ||
assert.equal("onica", getContext(vm).result) | ||
}) | ||
it('set equal to result of method ', function () { | ||
var vm = "#set( $monkey = 1234 ) ## number literal\n" + | ||
'#set( $result = $monkey.toString() ) ##calling method' | ||
assert.equal("1234", getContext(vm).monkey) | ||
assert.equal("1234", getContext(vm).result) | ||
}) | ||
it('equal to method/property reference', function() { | ||
@@ -212,0 +226,0 @@ var vm = "#set($monkey.Blame = $spindoctor.Leak) ## property \n" + |
Sorry, the diff of this file is not supported yet
1391071
5616