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 {
diff --git a/dev/js/src/selectMenu.js b/dev/js/src/selectMenu.js
index d8db4cd..dc0f863 100644
--- a/dev/js/src/selectMenu.js
+++ b/dev/js/src/selectMenu.js
@@ -36,7 +36,7 @@
._init(list, {
itemClass : selectMenuItemClass
});
-
+
obj._container = element;
obj._select = select;
obj._select.style.display = 'none';
@@ -67,7 +67,6 @@
this.showTitle();
}.bind(obj));
- // Show the title
obj.showTitle();
return obj;
},
@@ -81,7 +80,7 @@
this._select.selectedIndex = index;
};
- return this._selected || 0;
+ return this._selected || this._select.selectedIndex || 0;
},
/**