Assign methods should create an object when object is nullish.

This commit is contained in:
John-David Dalton
2016-01-07 21:53:35 -08:00
parent 6fa9490a13
commit 8bd8aa3037
2 changed files with 15 additions and 10 deletions

View File

@@ -3835,7 +3835,7 @@
function createAssigner(assigner) {
return rest(function(object, sources) {
var index = -1,
length = object == null ? 0 : sources.length,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;