Make _.wrap use _.identity when wrapper is nullish. [closes #767]

This commit is contained in:
John-David Dalton
2014-11-06 23:15:48 -08:00
parent d7b0e66270
commit c3a5b12cd3
2 changed files with 16 additions and 4 deletions

View File

@@ -6936,6 +6936,7 @@
* // => '<p>fred, barney, &amp; pebbles</p>'
*/
function wrap(value, wrapper) {
wrapper = wrapper == null ? identity : wrapper;
return createWrapper(wrapper, PARTIAL_FLAG, null, [value]);
}