Skip to content

Commit a37cdb7

Browse files
committed
crate.version: Simplify notYankedOrIsOwner property
1 parent 64cdaa9 commit a37cdb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/controllers/crate/version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export default Controller.extend({
3333
isOwner: computed('crate.owner_user', 'session.currentUser.id', function () {
3434
return this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
3535
}),
36-
notYankedOrIsOwner: computed('currentVersion', 'crate.owner_user', 'session.currentUser.id', function () {
37-
return !this.currentVersion.yanked || this.get('crate.owner_user').findBy('id', this.get('session.currentUser.id'));
36+
notYankedOrIsOwner: computed('currentVersion.yanked', 'isOwner', function () {
37+
return !this.currentVersion.yanked || this.isOwner;
3838
}),
3939

4040
sortedVersions: readOnly('crate.versions'),

0 commit comments

Comments
 (0)