Created
January 17, 2019 11:21
-
-
Save basz/41dce162d4567170d0ca04a556e4a5e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addedElements: computed('elements.[]', function() { | |
const elements = this.get('elements'); | |
const newElements = elements.filter(element => !this.get('prevElements').includes(element)); | |
this.set('prevElements', elements.copy()); // this is *bad* | |
return newElements; | |
}), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment