@@ -191,7 +191,7 @@ export abstract class SubgraphIONodeBase<
191191 * @param event The event that triggered the context menu.
192192 */
193193 protected showSlotContextMenu ( slot : TSlot , event : CanvasPointerEvent ) : void {
194- const options : IContextMenuValue [ ] = this . #getSlotMenuOptions( slot )
194+ const options = this . #getSlotMenuOptions( slot )
195195 if ( ! ( options . length > 0 ) ) return
196196
197197 new LiteGraph . ContextMenu ( options , {
@@ -208,8 +208,8 @@ export abstract class SubgraphIONodeBase<
208208 * @param slot The slot to get the context menu options for.
209209 * @returns The context menu options.
210210 */
211- #getSlotMenuOptions( slot : TSlot ) : IContextMenuValue [ ] {
212- const options : IContextMenuValue [ ] = [ ]
211+ #getSlotMenuOptions( slot : TSlot ) : ( IContextMenuValue | null ) [ ] {
212+ const options : ( IContextMenuValue | null ) [ ] = [ ]
213213
214214 // Disconnect option if slot has connections
215215 if ( slot !== this . emptySlot && slot . linkIds . length > 0 ) {
@@ -218,10 +218,10 @@ export abstract class SubgraphIONodeBase<
218218
219219 // Remove / rename slot option (except for the empty slot)
220220 if ( slot !== this . emptySlot ) {
221- options . push (
222- { content : 'Remove Slot' , value : 'remove' } ,
223- { content : 'Rename Slot' , value : 'rename' }
224- )
221+ options . push ( { content : 'Rename Slot' , value : 'rename' } , null , {
222+ content : 'Remove Slot' ,
223+ value : 'remove'
224+ } )
225225 }
226226
227227 return options
0 commit comments