Skip to content

Commit 05ee5b4

Browse files
committed
MOBILE-1666 db: Fix index generators
1 parent 1c03904 commit 05ee5b4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

www/core/lib/sitesfactory.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,14 @@ angular.module('mm.core')
122122
// Needs a generator instead of keyPath.
123123
angular.forEach(indexes, function(index) {
124124
if (index.keyPath) {
125+
var path = index.keyPath;
125126
index.generator = function(obj) {
126127
var arr = [];
127-
angular.forEach(index.keyPath, function(keyName) {
128+
angular.forEach(path, function(keyName) {
128129
arr.push(obj[keyName]);
129130
});
130131
return arr;
131-
}
132+
};
132133
delete index.keyPath;
133134
}
134135
});

0 commit comments

Comments
 (0)