[OpenLayers-Commits] r10823 - trunk/openlayers/lib/OpenLayers

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Oct 13 09:59:32 EDT 2010


Author: fredj
Date: 2010-10-13 06:59:31 -0700 (Wed, 13 Oct 2010)
New Revision: 10823

Modified:
   trunk/openlayers/lib/OpenLayers/SingleFile.js
Log:
return an empty string if the script don't ends with 'OpenLayers.js', add OpenLayers.VERSION_NUMBER. r=elemoine (closes #2873)

Modified: trunk/openlayers/lib/OpenLayers/SingleFile.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/SingleFile.js	2010-10-13 13:02:08 UTC (rev 10822)
+++ trunk/openlayers/lib/OpenLayers/SingleFile.js	2010-10-13 13:59:31 UTC (rev 10823)
@@ -7,9 +7,13 @@
     singleFile: true,
     _getScriptLocation: (function() {
         var s = document.getElementsByTagName('script');
-        var l = s[s.length-1].getAttribute("src").match(/(^|(.*?\/))(OpenLayers\.js)(\?|$)/)[1];
+        var match = s[s.length-1].getAttribute("src").match(/(^|(.*?\/))(OpenLayers\.js)(\?|$)/);
+        var l = match ? match[1] : "";
         return (function() { return l; });
     })()
 };
 
-
+/**
+ * Constant: VERSION_NUMBER
+ */
+OpenLayers.VERSION_NUMBER="$Revision$";


Property changes on: trunk/openlayers/lib/OpenLayers/SingleFile.js
___________________________________________________________________
Added: svn:keywords
   + Revision



More information about the Commits mailing list