mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Default to empty array results in Ember services
This commit is contained in:
parent
38e8c4665a
commit
8d65c2d571
10 changed files with 36 additions and 11 deletions
|
@ -12,6 +12,7 @@
|
|||
import { inject as service } from '@ember/service';
|
||||
import { computed } from '@ember/object';
|
||||
import { Promise as EmberPromise } from 'rsvp';
|
||||
import miscUtil from '../utils/misc';
|
||||
import SimpleAuthSession from 'ember-simple-auth/services/session';
|
||||
|
||||
export default SimpleAuthSession.extend({
|
||||
|
@ -88,7 +89,8 @@ export default SimpleAuthSession.extend({
|
|||
hasWhatsNew() {
|
||||
return new EmberPromise((resolve) => {
|
||||
return this.get('userSvc').getUser(this.get('user.id')).then((user) => {
|
||||
resolve(user.get('lastVersion') !== this.get('appMeta.version'));
|
||||
let isNew = miscUtil.isNewVersion(user.get('lastVersion'), this.get('appMeta.version'), false);
|
||||
resolve(isNew);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue