Skip to content

Commit

Permalink
Check for cached function value when parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ntfink committed Dec 12, 2018
1 parent 6feca07 commit 759971a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/style/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ styfn.applyParsedProperty = function( ele, parsedProp ){

case types.fn: {
let fn = prop.value;
let fnRetVal = fn( ele );
let fnRetVal = prop.fnValue || fn( ele ); // check for cached value before calling function

if( fnRetVal == null ){
util.warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)');
Expand Down

0 comments on commit 759971a

Please sign in to comment.