Skip to content

Commit d11f2bd

Browse files
committed
fix: should return all values of the object
1 parent 12b61e9 commit d11f2bd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

plugins/data_migration/frontend/public/javascripts/countly.views.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@
2323
countlyDataMigration.loadImportList()
2424
.then(function(res) {
2525
if (typeof res.result === "object") {
26-
var aa = Object.entries(res.result);
27-
aa[0].forEach(function(element) {
28-
if (typeof element === "object") {
29-
res.result = [element];
30-
}
31-
});
32-
self.list = res.result;
26+
var finalArr = [];
27+
for (var key in res.result) {
28+
var element = res.result[key];
29+
finalArr.push(element);
30+
}
31+
self.list = finalArr;
3332
}
3433
else if (typeof res.result === "string") {
3534
self.list = [];

0 commit comments

Comments
 (0)