Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failures when setting a value on a destroyed initials mixin. #36

Closed
kiwiupover opened this issue Aug 23, 2017 · 0 comments
Closed

Comments

@kiwiupover
Copy link

kiwiupover commented Aug 23, 2017

I'm getting test failures Cannot call writeDeps after the object is destroyed. when the trying call method on the initials mixin is destroyed.

Versions:
DEBUG: Ember : 2.13.4
DEBUG: Ember Data : 2.12.2

a fix

backgroundColor: Ember.computed('colors.length', 'seedText', 'defaultName', 'defaultBackground', function () {
    if (this.isDestroyed) { return; }

    if (this.get('seedText') === this.get('defaultName')) {
      return this.get('defaultBackground');
    } else {
      let index = ColorIndex(this.get('seedText'), this.get('colors.length'));
      return this.get('colors')[index];
    }
  }),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant