use duck-typing instead of type field
This commit is contained in:
parent
13c69cb8ad
commit
ccdf069cdd
|
@ -448,7 +448,7 @@ export class ApNoteService {
|
||||||
|
|
||||||
const limit = promiseLimit<MiDriveFile>(2);
|
const limit = promiseLimit<MiDriveFile>(2);
|
||||||
const filePromises = attachments
|
const filePromises = attachments
|
||||||
.filter(attach => toArray(attach.type).includes('Image'))
|
.filter(attach => typeof(attach.url) === 'string')
|
||||||
.map(attach => (
|
.map(attach => (
|
||||||
limit(() => this.apImageService.resolveImage(actor, {
|
limit(() => this.apImageService.resolveImage(actor, {
|
||||||
...attach,
|
...attach,
|
||||||
|
|
Loading…
Reference in New Issue