File tree 1 file changed +9
-13
lines changed
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change 1232
1232
1233
1233
case 'sub' :
1234
1234
createNameNode ( item ) . appendTo ( $t ) ;
1235
-
1236
1235
item . appendTo = item . $node ;
1237
- //op.create(item, root); decide later, might be a promise.
1238
1236
$t . data ( 'contextMenu' , item ) . addClass ( 'context-menu-submenu' ) ;
1239
1237
item . callback = null ;
1238
+ //if item contains items, and this is a promise, we should create it later
1239
+ //check if subitems is of type promise. If it is a promise we need to create it later, after promise has been resolved
1240
+ if ( 'function' === typeof item . items . then ) {
1241
+ // probably a promise, process it, when completed it will create the sub menu's.
1242
+ op . processPromises ( item , root , item . items ) ;
1243
+ } else {
1244
+ // normal submenu.
1245
+ op . create ( item , root ) ;
1246
+ }
1240
1247
break ;
1241
1248
1242
1249
case 'html' :
1256
1263
break ;
1257
1264
}
1258
1265
1259
- if ( item . type === 'sub' ) {
1260
- //if item contains items, and this is a promise, we should create it later
1261
- //check if subitems is of type promise. If it is a promise we need to create it later, after promise has been resolved
1262
- if ( 'function' === typeof item . items . then ) {
1263
- // probably a promise, process it, when completed it will create the sub menu's.
1264
- op . processPromises ( item , root , item . items ) ;
1265
- } else {
1266
- // normal submenu.
1267
- op . create ( item , root ) ;
1268
- }
1269
- }
1270
1266
// disable key listener in <input>
1271
1267
if ( item . type && item . type !== 'sub' && item . type !== 'html' && item . type !== 'cm_seperator' ) {
1272
1268
$input
You can’t perform that action at this time.
0 commit comments