LockerProject/Locker — Issue #675: lutil.extend doesn't do what we want
Author: othiym23
Created: 2012-02-01 04:03:13+00:00
State: open
Labels: techdebt

Ran across this when I found a bug around how I was storing profile information on a couple of my connectors. The synclet manager uses `lutil.extend` to add the objects returned by the synclet back into me.json. In the case where the preëxisting object is an array, it tries to put the object into the array rather than replacing the array with the object. This behavior arguably makes sense in the client-side context that jQuery.extend was originally written for, but it doesn't behave the way we want it to, in this case at least. There's a lot of behavior in that function, and I'd guess we only want a tiny little piece of it.