diff --git a/lib/OpenLayers/SingleFile.js b/lib/OpenLayers/SingleFile.js index 7188c5a2ee..55fb854e44 100644 --- a/lib/OpenLayers/SingleFile.js +++ b/lib/OpenLayers/SingleFile.js @@ -7,9 +7,13 @@ var OpenLayers = { 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$";