Fix spread usage
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
0fc593e8ab
commit
4f7b677185
@ -64,8 +64,9 @@ require("./db/photos").then(function(db) {
|
|||||||
|
|
||||||
console.log(`Scanning ${args.length} faces.`);
|
console.log(`Scanning ${args.length} faces.`);
|
||||||
return Promise.map(args, (arg) => {
|
return Promise.map(args, (arg) => {
|
||||||
const file = arg,
|
const file = arg;
|
||||||
id = parseInt(arg);
|
|
||||||
|
let id = parseInt(arg);
|
||||||
|
|
||||||
let loader;
|
let loader;
|
||||||
|
|
||||||
@ -129,7 +130,11 @@ require("./db/photos").then(function(db) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return loader.spread((filepath, image, detectors) => {
|
return loader.then((results) => {
|
||||||
|
const filepath = results[0],
|
||||||
|
image = results[1],
|
||||||
|
detectors = results[2];
|
||||||
|
|
||||||
process.stdout.write(`${detectors.length} faces.\n`);
|
process.stdout.write(`${detectors.length} faces.\n`);
|
||||||
|
|
||||||
return Promise.map(detectors, (face, index) => {
|
return Promise.map(detectors, (face, index) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user