Ensure placeholder uses func when its a lib.

This commit is contained in:
John-David Dalton
2016-03-01 09:49:16 -08:00
parent 63147cd145
commit 89f891ac86
2 changed files with 17 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
var mapping = require('./_mapping'),
mutateMap = mapping.mutate,
placeholder = {};
fallbackHolder = {};
/**
* The base implementation of `convert` which accepts a `util` object of methods
@@ -40,7 +40,8 @@ function baseConvert(util, name, func, options) {
'rearg': 'rearg' in options ? options.rearg : true
};
var forceRearg = ('rearg' in options) && options.rearg;
var forceRearg = ('rearg' in options) && options.rearg,
placeholder = isLib ? func : fallbackHolder;
var helpers = isLib ? func : {
'ary': util.ary,