Browse Source

Fix error when path has only numeric chars

Norio Suzuki 9 years ago
parent
commit
c9e1104d33
1 changed files with 1 additions and 1 deletions
  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) + '(/)?$';