Skip to content

Commit 69f6a5b

Browse files
author
Denis
committed
fix case with key=undefined
1 parent 113f083 commit 69f6a5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

init.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ var MSG_EDIT_ITEM_CANC = "Editing canceled";
3333

3434
/* ---------- BUTTONS ---------- */
3535
var BUTTON = function(key, _mode){
36-
// if catalog has no items and mode doesn't edit then ignore and only actions
37-
if(_mode != 1 && menu[key].values.length == 0)
38-
return;
39-
4036
if(key == undefined){
4137
key = bot.init.menu_root;
4238
}
4339

40+
// if catalog has no items and mode doesn't edit then ignore and only actions
41+
if(_mode != 1 && menu[key].values.length == 0)
42+
return;
43+
4444
var btns = [];
4545

4646
for(var i = 0; i < menu[key].values.length; i++){

0 commit comments

Comments
 (0)