File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
browser/src/control/jsdialog Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ JSDialog.OpenDropdown = function (
167167 let pos = - 1 ;
168168 if ( typeof data === 'number' ) pos = data ;
169169 else pos = data ? parseInt ( data . substr ( 0 , data . indexOf ( ';' ) ) ) : - 1 ;
170- const entry = targetEntries && pos > 0 ? targetEntries [ pos ] : null ;
170+ const entry = targetEntries && pos >= 0 ? targetEntries [ pos ] : null ;
171171 const subMenuId = object . id + '-' + pos ;
172172
173173 if ( eventType === 'selected' || eventType === 'showsubmenu' ) {
@@ -209,6 +209,14 @@ JSDialog.OpenDropdown = function (
209209 window . L . Map . THIS . sendUnoCommand ( uno ) ;
210210 JSDialog . CloseDropdown ( id ) ;
211211 return ;
212+ } else {
213+ app . console . error (
214+ 'Dropdown: unhandled action: "' +
215+ eventType +
216+ '" for entry: "' +
217+ JSON . stringify ( entry ) +
218+ '"' ,
219+ ) ;
212220 }
213221 } else if ( eventType === 'hidedropdown' ) {
214222 closeLastSubMenu ( ) ;
You can’t perform that action at this time.
0 commit comments