Skip to content

Commit

Permalink
fix: update waitFor
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Nov 24, 2021
1 parent 9b2abb7 commit 244011e
Show file tree
Hide file tree
Showing 4 changed files with 276 additions and 429 deletions.
2 changes: 2 additions & 0 deletions addon/components/new-version-notifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
import fetch from 'fetch';
import { later } from '@ember/runloop';
import { waitFor } from '@ember/test-waiters';

let taskRunCounter = 0;

Expand Down Expand Up @@ -87,6 +88,7 @@ export default class NewVersionNotifier extends Component {
}
@task
@waitFor
*updateVersion() {
const url = this.url;
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = {
/**
* Store `ember-cli-build.js` options
*/
included: function (app /*, parentAddon*/) {
included(app /*, parentAddon*/) {
this._super.included.apply(this, arguments);
this._options = app.options.newVersion || {};

Expand All @@ -23,7 +23,7 @@ module.exports = {
/**
* Copy version from `ember-cli-app-version`
*/
config: function (env, baseConfig) {
config(env, baseConfig) {
this._appVersion = baseConfig.APP.version || null;
},

Expand All @@ -34,7 +34,7 @@ module.exports = {
* - ember-cli-app-version if installed
* - package.json of consuming application or
*/
treeForPublic: function () {
treeForPublic() {
let detectedVersion;

if (this._options.useAppVersion && this._appVersion) {
Expand Down
Loading

0 comments on commit 244011e

Please sign in to comment.