Browse Source

EAGLESIX-454 tagging release v0.6.9+2014.03.07

Thomas Bell 11 years ago
parent
commit
ca9770f3f4
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lib/pipeline/documentSources/SortDocumentSource.js

+ 5 - 1
lib/pipeline/documentSources/SortDocumentSource.js

@@ -143,6 +143,10 @@ proto.populate = function populate() {
 		this.documents.push(doc);
 	}
 
+	this.vSortKeyFPEs = this.vSortKey.map(function(aSortKey){
+		return new FieldPathExpression(aSortKey.getFieldPath(false));
+	});
+
 	/* sort the list */
 	this.documents.sort(SortDocumentSource.prototype.compare.bind(this));
 
@@ -173,7 +177,7 @@ proto.compare = function compare(pL,pR) {
 	var n = this.vSortKey.length;
 	for(var i = 0; i < n; ++i) {
 		/* evaluate the sort keys */
-		var pathExpr = new FieldPathExpression(this.vSortKey[i].getFieldPath(false));
+		var pathExpr = this.vSortKeyFPEs[i];
 		var left = pathExpr.evaluate(pL), right = pathExpr.evaluate(pR);
 
 		/*