Skip to content

Commit

Permalink
fix: typescript type narrowing (#619)
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas authored Mar 30, 2022
1 parent ce47233 commit abe98a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/widgets/filesystem/FileSystemContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</v-list>
</v-col>
<v-col
v-if="file.thumbnails && file.thumbnails.length"
v-if="'thumbnails' in file && file.thumbnails && file.thumbnails.length"
class="px-2 d-none d-sm-flex"
>
<img
Expand All @@ -122,7 +122,7 @@
import { Component, Mixins, Prop } from 'vue-property-decorator'
import FilesMixin from '@/mixins/files'
import StateMixin from '@/mixins/state'
import { AppFile, AppFileWithMeta } from '@/store/files/types'
import { AppDirectory, AppFile, AppFileWithMeta } from '@/store/files/types'
/**
* NOTE: Generally, moonraker expects the paths to include the root.
Expand All @@ -136,7 +136,7 @@ export default class FileSystemContextMenu extends Mixins(StateMixin, FilesMixin
open!: boolean
@Prop({ type: Object, required: true })
file!: AppFile | AppFileWithMeta
file!: AppDirectory | AppFile | AppFileWithMeta
@Prop({ type: Number, required: true })
positionX!: number
Expand Down

0 comments on commit abe98a0

Please sign in to comment.