Procházet zdrojové kódy

Fix error when path has only numeric chars

Norio Suzuki před 10 roky
rodič
revize
c9e1104d33
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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 shortPath = $link.data('short-path');
 
 
     var escape = function(s) {
     var escape = function(s) {
-      return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
+      return (s + '').replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
     };
     };
     var pattern = escape(shortPath) + '(/)?$';
     var pattern = escape(shortPath) + '(/)?$';