소스 검색

@uppy/unsplash: fix nested meta (#3485)

* fix nested meta

causing error #3477

* Update packages/@uppy/provider-views/src/View.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

Co-authored-by: Mikael Finstad <finstaden@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Artur Paikin 3 년 전
부모
커밋
f429f43374
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      packages/@uppy/provider-views/src/View.js

+ 2 - 1
packages/@uppy/provider-views/src/View.js

@@ -101,7 +101,8 @@ module.exports = class View {
     }
 
     if (file.author) {
-      tagFile.meta.author = file.author
+      if (file.author.name != null) tagFile.meta.authorName = String(file.author.name)
+      if (file.author.url) tagFile.meta.authorUrl = file.author.url
     }
 
     this.plugin.uppy.log('Adding remote file')