Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Fixes computed-property.override deprecation
Browse files Browse the repository at this point in the history
Replaces 'events' and 'options' computed properties with primitive values
  • Loading branch information
tszymon authored and Matt-Jensen committed Feb 25, 2021
1 parent e9fc39d commit 0e5dd27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addon/components/swiper-container.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* globals Swiper */
import Component from '@ember/component';
import { getProperties, computed } from '@ember/object';
import { getProperties } from '@ember/object';
import { once } from '@ember/runloop';
import { warn } from '@ember/debug';
import { assign as emAssign } from '@ember/polyfills';
Expand Down Expand Up @@ -49,7 +49,7 @@ export default Component.extend({
* User defined map of Swiper events
* @type {Object}
*/
events: computed(() => Object.create(null)),
events: null,

/**
* Abstraction to invoke `Swiper.update`
Expand Down Expand Up @@ -98,7 +98,7 @@ export default Component.extend({
* @public
* @type {Object}
*/
options: computed(() => ({})),
options: null,

/**
* Get Swiper options from attributes
Expand Down Expand Up @@ -271,7 +271,7 @@ export default Component.extend({
);

// Subscribe configured actions as Swiper events
keys(this.get('events')).forEach((evt) =>
keys(this.get('events') || {}).forEach((evt) =>
instance.on(evt, this.get(`events.${evt}`))
);

Expand Down

0 comments on commit 0e5dd27

Please sign in to comment.