aboutsummaryrefslogtreecommitdiffstats
path: root/command_menu.js
diff options
context:
space:
mode:
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) {