Explorar el Código

Fix error when path has only numeric chars

Norio Suzuki hace 10 años
padre
commit
c9e1104d33
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      resource/js/crowi.js

+ 1 - 1
resource/js/crowi.js

@@ -320,7 +320,7 @@ $(function() {
     var shortPath = $link.data('short-path');
 
     var escape = function(s) {
-      return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+      return (s + '').replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
     };
     var pattern = escape(shortPath) + '(/)?$';