fix the auto-complete and tree display caused by adding has_metadata filed
Change-Id: I35e6fba7b8e54c82cc408ed6c4ba03d6d7a0b38b
diff --git a/client/catalog/js/catalog.js b/client/catalog/js/catalog.js
index 2f80e01..5203fdc 100644
--- a/client/catalog/js/catalog.js
+++ b/client/catalog/js/catalog.js
@@ -118,7 +118,7 @@
var list = data.next;
var last = data.lastComponent === true;
callback(list.map(function(element) {
- return field + element + (last ? "/" : "");
+ return field + element.name + (last ? "/" : "");
//Don't add trailing slash for last component.
}));
});
@@ -208,7 +208,7 @@
}
console.log("Autocomplete response", list);
callback(list.map(function(element) {
- return (path == "/" ? "/" : "") + element + "/";
+ return (path == "/" ? "/" : "") + element.name + "/";
}));
});
});