Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Arrays should respect the "deep" argument to Ember.copy() #588

Closed
adamjmurray opened this Issue · 2 comments

3 participants

@adamjmurray

See http://jsfiddle.net/e4nZE/

In NativeArray you have implemented copy() with a slice(). Perhaps it could be enhanced something like this?

copy: function(deep) {
  if(deep) {
    return this.map(function(item){ return Ember.copy(item, true); });
  } else {
    return this.slice();
  }
}
@wagenet
Owner

That might work. You should also make sure to test deep copying with elements that do not implement Copyable.

@tomdale tomdale closed this in ff265c0
@ghempton ghempton referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@ghempton ghempton referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@adamjmurray

Confirmed fixed in Ember 1 pre4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.