Fixed select menu
diff --git a/dev/js/src/api.js b/dev/js/src/api.js
index c03013f..5295b3c 100644
--- a/dev/js/src/api.js
+++ b/dev/js/src/api.js
@@ -28,7 +28,7 @@
 
     // This is for legacy support
     var legacy = legacySigle.exec(match.textSigle);
-    if (legacy[0]) {
+    if (legacy !== null && legacy[0]) {
       url += '/' + legacy[1] + '/' + legacy[2] + '/' + legacy[3];
     }
     else {