IP Address page - fix a bug "networkObj is undefined" when login as user-role.

This commit is contained in:
Jessica Wang 2011-01-07 12:07:24 -08:00
parent 318a5c7d0c
commit 7843b30ff2

View File

@ -1001,6 +1001,8 @@ function ipJsonToDetailsTab() {
}
function ipFindNetworkServiceByName(pName, networkObj) {
if(networkObj == null)
return null;
for(var i=0; i<networkObj.service.length; i++) {
var networkServiceObj = networkObj.service[i];
if(networkServiceObj.name == pName)
@ -1010,6 +1012,8 @@ function ipFindNetworkServiceByName(pName, networkObj) {
}
function ipFindCapabilityByName(pName, networkServiceObj) {
if(networkServiceObj == null)
return null;
for(var i=0; i<networkServiceObj.capability.length; i++) {
var capabilityObj = networkServiceObj.capability[i];
if(capabilityObj.name == pName)