Merge pull request #1554 from olegsmith/master

Support functions in L.Util.template
This commit is contained in:
Vladimir Agafonkin 2013-03-28 04:24:40 -07:00
commit 0aed98f7d2

View File

@ -92,6 +92,8 @@ L.Util = {
var value = data[key];
if (!data.hasOwnProperty(key)) {
throw new Error('No value provided for variable ' + str);
} else if (typeof value === 'function') {
value = value(data);
}
return value;
});