[wsas-java-dev] svn commit r9423 - branches/wsas/java/2.1/commons/adminui/www/js

svn at wso2.org svn at wso2.org
Fri Nov 2 05:39:58 PDT 2007


Author: saminda
Date: Fri Nov  2 05:39:55 2007
New Revision: 9423

Modified:
   branches/wsas/java/2.1/commons/adminui/www/js/main.js
Log:
Fixing for possible NULL pointers 


Modified: branches/wsas/java/2.1/commons/adminui/www/js/main.js
==============================================================================
--- branches/wsas/java/2.1/commons/adminui/www/js/main.js	(original)
+++ branches/wsas/java/2.1/commons/adminui/www/js/main.js	Fri Nov  2 05:39:55 2007
@@ -189,22 +189,25 @@
             }
             return;
         }
-        if (error.reason.indexOf("Access Denied. Please login first") > -1) {
-            if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
-                typeof(logoutVisual) != "undefined") {
-                stoppingRefreshingMethodsHook();
-                logoutVisual();
+        
+        if (error.reason != null) {
+            if (error.reason.indexOf("Access Denied. Please login first") > -1) {
+                if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
+                    typeof(logoutVisual) != "undefined") {
+                    stoppingRefreshingMethodsHook();
+                    logoutVisual();
+                }
             }
         }
 
-
-        if (error.detail.indexOf("NS_ERROR_NOT_AVAILABLE") > -1) {
-            if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
-                typeof(logoutVisual) != "undefined") {
-                stoppingRefreshingMethodsHook();
-                logoutVisual();
+        if (error.detail != null) {
+            if (error.detail.indexOf("NS_ERROR_NOT_AVAILABLE") > -1) {
+                if (typeof(stoppingRefreshingMethodsHook) != "undefined" &&
+                    typeof(logoutVisual) != "undefined") {
+                    stoppingRefreshingMethodsHook();
+                    logoutVisual();
+                }
             }
-
         }
 
         wso2.wsf.Util.alertWarning(error.reason);




More information about the Wsas-java-dev mailing list