Explorar o código

Truncate jQuery version, can be long and break display

Gaël Métais %!s(int64=10) %!d(string=hai) anos
pai
achega
368bf4a6d9
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      lib/metadata/policies.js

+ 5 - 0
lib/metadata/policies.js

@@ -312,6 +312,11 @@ var policies = {
                     return null;
                 }
 
+                // Truncate version number (can be long sometimes, no clue why but it can...)
+                if (value.length > 30) {
+                    value = value.substr(0, 28) + '...';
+                }
+
                 return {
                     value: value,
                     score: score,