Merge pull request #1554 from olegsmith/master
Support functions in L.Util.template
This commit is contained in:
commit
0aed98f7d2
@ -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;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user