diff options
| author | Pitu <[email protected]> | 2020-12-24 23:45:16 +0900 |
|---|---|---|
| committer | Pitu <[email protected]> | 2020-12-24 23:45:16 +0900 |
| commit | fb2c27086f570fec60f4d52dcc9ca80e53186293 (patch) | |
| tree | 4c4fd056c293b8e0de632023ef19fdea95c009fa /src/site/components/image-modal/AlbumInfo.vue | |
| parent | Merge pull request #228 from Zephyrrus/begone_trailing_commas (diff) | |
| download | host.fuwn.me-fb2c27086f570fec60f4d52dcc9ca80e53186293.tar.xz host.fuwn.me-fb2c27086f570fec60f4d52dcc9ca80e53186293.zip | |
Fix ESLint rules once and for all
Diffstat (limited to 'src/site/components/image-modal/AlbumInfo.vue')
| -rw-r--r-- | src/site/components/image-modal/AlbumInfo.vue | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/site/components/image-modal/AlbumInfo.vue b/src/site/components/image-modal/AlbumInfo.vue index 17c375a..8aeb02e 100644 --- a/src/site/components/image-modal/AlbumInfo.vue +++ b/src/site/components/image-modal/AlbumInfo.vue @@ -24,22 +24,20 @@ </template> <script> -import { mapState } from 'vuex'; - export default { name: 'Albuminfo', props: { imageId: { - type: Number, - default: 0 + 'type': Number, + 'default': 0 }, imageAlbums: { - type: Array, - default: () => [] + 'type': Array, + 'default': () => [] }, albums: { - type: Array, - default: () => [] + 'type': Array, + 'default': () => [] } }, data() { @@ -52,7 +50,7 @@ export default { this.orderedAlbums = this.getOrderedAlbums(); // we're sorting here instead of computed because we want sort on creation // then the array's values should be frozen - this.selectedOptions = this.imageAlbums.map((e) => e.id); + this.selectedOptions = this.imageAlbums.map(e => e.id); }, methods: { getOrderedAlbums() { @@ -70,8 +68,8 @@ export default { }, isAlbumSelected(id) { if (!this.showingModalForFile) return false; - const found = this.showingModalForFile.albums.find((el) => el.id === id); - return !!(found && found.id); + const found = this.showingModalForFile.albums.find(el => el.id === id); + return Boolean(found && found.id); }, async handleClick(id) { // here the album should be already removed from the selected list |