aboutsummaryrefslogtreecommitdiffstats
path: root/command_menu.js
diff options
context:
space:
mode:
authoranekos2008-08-13 23:57:35 +0000
committeranekos2008-08-13 23:57:35 +0000
commit0c7a6d28df06e6b3df5c10d09bc57d0c53202935 (patch)
tree551ef6a01ee6746d0f78469fa5668347ed9d8cdf /command_menu.js
parentf7764605d47df6932c93c13fb977f05ce8f2e6a5 (diff)
downloadvimperator-plugins-0c7a6d28df06e6b3df5c10d09bc57d0c53202935.tar.bz2
command_menu -> name が undefined になるときに対処。原因不明。
migemized_find -> 文字ケース修正 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@17610 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'command_menu.js')
-rw-r--r--command_menu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/command_menu.js b/command_menu.js
index f51b6fb..b701ca4 100644
--- a/command_menu.js
+++ b/command_menu.js
@@ -2,7 +2,7 @@
// @name Command-MainMenu
// @description-ja メインメニューとツールバーをコマンドで実行できる
// @license Creative Commons 2.1 (Attribution + Share Alike)
-// @version 1.2
+// @version 1.3
// ==/VimperatorPlugin==
//
// Usage:
@@ -115,7 +115,7 @@
const contextmenu = document.getElementById('contentAreaContextMenu');
function fixName (name) {
- return name.replace(/^\s+|\s+$/, '').replace(/[\-\s]+/g, '_');
+ return name ? name.replace(/^\s+|\s+$/, '').replace(/[\-\s]+/g, '_') : '';
}
function getElementName (elem, multi) {