Skip to content

Commit ab3cda2

Browse files
committed
crate.version: Inline notYankedOrIsOwner property
1 parent a37cdb7 commit ab3cda2

File tree

3 files changed

+1
-40
lines changed

3 files changed

+1
-40
lines changed

app/controllers/crate/version.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ 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.yanked', 'isOwner', function () {
37-
return !this.currentVersion.yanked || this.isOwner;
38-
}),
3936

4037
sortedVersions: readOnly('crate.versions'),
4138

app/templates/crate/version.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
{{/if}}
7171
{{/if}}
7272
</div>
73-
{{#if this.notYankedOrIsOwner}}
73+
{{#if (or this.isOwner (not this.currentVersion.yanked))}}
7474
<section local-class='authorship' aria-label="Crate metadata">
7575
<div local-class='top'>
7676
<div>

tests/unit/controllers/crate/version-test.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)