← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3249: Fix for IE9, referrer is undefined

 

------------------------------------------------------------
revno: 3249
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-04-01 11:15:54 +0200
message:
  Fix for IE9, referrer is undefined
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-03-28 17:46:09 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2011-04-01 09:15:54 +0000
@@ -12,9 +12,7 @@
  *            if there is not document.referrer, use this url
  */
 function referrerBack( defaultUrl ) {
-	if(document.referrer != "") {
-/*		var splitReferrer = document.referrer.split("\/");
-		var referrer = splitReferrer[splitReferrer.length-1]; */
+	if(document.referrer !== undefined && document.referrer != "") {
 		location.href = referrer;
 	} else {
 		location.href = defaultUrl;