diff --git a/ui/scripts/system.js b/ui/scripts/system.js index b65830158b2..5c49a1a632b 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -16897,18 +16897,25 @@ dataType: "json", success: function (json) { var item = json.liststoragetagsresponse.storagetag; - var tags = $.map(item, function (tag) { - return { - id: tag.name, - name: tag.name - }; - }); + var tags = []; + + if (item != null) + { + tags = $.map(item, function (tag) { + return { + id: tag.name, + name: tag.name + }; + }); + } + args.response.success({ data: tags }); }, error: function (XMLHttpResponse) { var errorMsg = parseXMLHttpResponse(XMLHttpResponse); + args.response.error(errorMsg); } });