-
Notifications
You must be signed in to change notification settings - Fork 27.5k
angular.copy return [undefined] when copy undefined to array #8610
Comments
I'm not sure that returning the source in this case is correct either because the documentation for destination states:
|
So it's interesting what happens here --- we try to clear I can make a quick PR for that, but honestly I don't really see the use-case in doing this anyways |
@caitp In that case would you remove the documentation for destination that says |
That line in the docs was added back when Lines 581 to 611 in d517bca
Now, even back then, there was never any requirement that they were the same type, it just makes more sense if they're the same type (I mean, it doesn't make a whole lot of sense to try to copy So, I dunno, I think it's probably better to keep the line in the docs, just because it's probably better if you do use the same type, but this has never been enforced |
In document said
The text was updated successfully, but these errors were encountered: