]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1795] window.archivaRuntimeInfo.version is null in archiva/archiva.js
authorOlivier Lamy <olamy@apache.org>
Wed, 4 Dec 2013 23:06:16 +0000 (23:06 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 4 Dec 2013 23:06:16 +0000 (23:06 +0000)
add a null check!

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1547956 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/archiva.js

index 654e6329069d5b3ee02e5cf3b3916b64cd5d27f2..3dff3e79240fc2b9e651dad1915c611860711b65 100644 (file)
@@ -22,7 +22,7 @@ appendArchivaVersion=function(){
 };
 
 timestampNoCache=function(){
-  if (window.archivaRuntimeInfo.version.match("SNAPSHOT$")){
+  if (window.archivaRuntimeInfo.version && window.archivaRuntimeInfo.version.match("SNAPSHOT$")){
     return "&archivaTimestamp="+window.archivaRuntimeInfo.timestamp+(window.archivaRuntimeInfo.devMode?"&_="+jQuery.now():"");
   }
   return "";