summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-12-11 13:52:06 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-12-11 13:52:06 +0900
commitdf43de048793fdda20379a0e6c0da6e81a49690d (patch)
treec7ab5eb54a33650d9263c4fcea691cc1bfcacd02 /tools
parentFix bug (diff)
downloadsharkey-df43de048793fdda20379a0e6c0da6e81a49690d.tar.gz
sharkey-df43de048793fdda20379a0e6c0da6e81a49690d.tar.bz2
sharkey-df43de048793fdda20379a0e6c0da6e81a49690d.zip
:v:
Diffstat (limited to 'tools')
-rw-r--r--tools/migration/node.2017-12-11.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/migration/node.2017-12-11.js b/tools/migration/node.2017-12-11.js
index 3a3fef0518..b9686b8b4d 100644
--- a/tools/migration/node.2017-12-11.js
+++ b/tools/migration/node.2017-12-11.js
@@ -17,7 +17,11 @@ const migrate = doc => new Promise(async (res, rej) => {
.setFormat('ppm')
.resize(1, 1)
.toBuffer(async (err, buffer) => {
- if (err) rej(err);
+ if (err) {
+ console.error(err);
+ res(false);
+ return;
+ }
const r = buffer.readUInt8(buffer.length - 3);
const g = buffer.readUInt8(buffer.length - 2);
const b = buffer.readUInt8(buffer.length - 1);