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

chore: remove @ember/polyfills #94

Open
imcodingideas opened this issue Oct 17, 2024 · 0 comments
Open

chore: remove @ember/polyfills #94

imcodingideas opened this issue Oct 17, 2024 · 0 comments

Comments

@imcodingideas
Copy link

When upgrading ember-data to 5, @ember/polyfills no longer works. With this change I was able to upgrade to the latest ember-data.

diff --git a/node_modules/ember-initials/addon/components/initials/index.js b/node_modules/ember-initials/addon/components/initials/index.js
index db41be0..549fc22 100644
--- a/node_modules/ember-initials/addon/components/initials/index.js
+++ b/node_modules/ember-initials/addon/components/initials/index.js
@@ -2,7 +2,6 @@ import ImageAvatarComponent from '../image';
 import { tracked } from '@glimmer/tracking';
 import { action } from '@ember/object';
 import { reads } from '@ember/object/computed';
-import { assign } from '@ember/polyfills';
 
 import initialsFor from 'ember-initials/utils/initials';
 import Store from 'ember-initials/utils/store';
@@ -76,7 +75,7 @@ class InitialsAvatarComponent extends ImageAvatarComponent {
   }
 
   set src(value) {
-    return this._src = value;
+    this._src = value;
   }
 
   get initials() {
@@ -84,7 +83,7 @@ class InitialsAvatarComponent extends ImageAvatarComponent {
   }
 
   set initials(value) {
-    return this._initials = value;
+    this._initials = value;
   }
 
   get defaultTextStyles() {
@@ -108,7 +107,7 @@ class InitialsAvatarComponent extends ImageAvatarComponent {
   }
 
   set backgroundStyles(value) {
-    return this._backgroundStyles = assign({}, this.defaultBackgroundStyles, value);
+    this._backgroundStyles = { ...this.defaultBackgroundStyles, ...value };
   }
 
   get textStyles() {
@@ -116,7 +115,7 @@ class InitialsAvatarComponent extends ImageAvatarComponent {
   }
 
   set textStyles(value) {
-    return this._textStyles = assign({}, this.defaultTextStyles, value);
+    this._textStyles = { ...this.defaultTextStyles, ...value };
   }
 
   get backgroundColor() {
@@ -134,7 +133,7 @@ class InitialsAvatarComponent extends ImageAvatarComponent {
   }
 
   set backgroundColor(value) {
-    return this._backgroundColor = value;
+    this._backgroundColor = value;
   }
 
   @action
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