fix study multiboard mongodb function

pull/7139/head
Thibault Duplessis 2020-08-18 18:16:56 +02:00
parent 37e9e4445a
commit 848e1686ab
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ final class StudyMultiBoard(
runCommand = runCommand,
command = $doc(
"map" -> """var node = this.root, child, tagPrefixes = ['White','Black','Result'], result = {name:this.name,orientation:this.setup.orientation,tags:this.tags.filter(t => tagPrefixes.find(p => t.startsWith(p)))};
if (result.tags.lengthIs > 1) { while(child = node.n[0]) { node = child }; }
if (result.tags.length > 1) { while(child = node.n[0]) { node = child }; }
result.fen = node.f;
result.uci = node.u;
emit(this._id, result)""",