提交 10fc385c 编写于 作者: J Jason Song 提交者: GitHub

Merge pull request #488 from lepdou/bugfix_publicnamespace

UI handle public namespace not exist situation
......@@ -222,7 +222,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
}
function initLinkedNamespace(namespace) {
if (!namespace.isPublic || !namespace.isLinkedNamespace) {
if (!namespace.isPublic || !namespace.isLinkedNamespace || namespace.format != 'properties') {
return;
}
//load public namespace
......@@ -237,12 +237,11 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
linkNamespaceItemKeys.push(key);
});
publicNamespace.viewItems = [];
publicNamespace.items.forEach(function (item) {
var key = item.item.key;
if (key){
if (key) {
publicNamespace.viewItems.push(item);
}
......@@ -250,7 +249,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
if (item.isModified || item.isDeleted) {
publicNamespace.isModified = true;
} else if (key){
} else if (key) {
publicNamespace.hasPublishedItem = true;
}
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册