diff options
| author | こぴなたみぽ <Syuilotan@yahoo.co.jp> | 2017-11-07 18:47:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-07 18:47:23 +0900 |
| commit | 68cf16882fa23f061763090498f51a58c52be8f4 (patch) | |
| tree | 3b8699779837988799a7cbb2a0715cbb32b43a4d /tools | |
| parent | v2944 (diff) | |
| download | misskey-68cf16882fa23f061763090498f51a58c52be8f4.tar.gz misskey-68cf16882fa23f061763090498f51a58c52be8f4.tar.bz2 misskey-68cf16882fa23f061763090498f51a58c52be8f4.zip | |
Fix bug
アップロードのバグなのか知らないけどなぜか data が存在しない drive_file ドキュメントがまれにあることがわかったので
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/migration/use-gridfs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/migration/use-gridfs.js b/tools/migration/use-gridfs.js index 148f9be261..f13d3c874e 100644 --- a/tools/migration/use-gridfs.js +++ b/tools/migration/use-gridfs.js @@ -19,7 +19,7 @@ const writeToGridFS = (bucket, buffer, ...rest) => new Promise((resolve, reject) const migrateToGridFS = async (doc) => { const id = doc._id - const buffer = doc.data.buffer + const buffer = doc.data ? doc.data.buffer : Buffer.from([0x00]) // アップロードのバグなのか知らないけどなぜか data が存在しない drive_file ドキュメントがまれにあることがわかったので const created_at = doc.created_at const name = doc.name |