@@ -183,9 +183,10 @@ export function showRowContextMenu(parentComponent: Component, e: MouseEvent, ro
183183 handler : ( ) => parentComponent ?. triggerCommand ( "addNewRow" , {
184184 parentNotePath : parentNoteId ,
185185 customOpts : {
186+ parentNoteUrl : parentNoteId ,
186187 target : "before" ,
187188 targetBranchId : rowData . branchId ,
188- } as CreateNoteWithUrlOpts
189+ }
189190 } )
190191 } ,
191192 {
@@ -194,12 +195,16 @@ export function showRowContextMenu(parentComponent: Component, e: MouseEvent, ro
194195 handler : async ( ) => {
195196 const branchId = row . getData ( ) . branchId ;
196197 const note = await froca . getBranch ( branchId ) ?. getNote ( ) ;
198+ if ( ! note ) {
199+ return ;
200+ }
197201 parentComponent ?. triggerCommand ( "addNewRow" , {
198- parentNotePath : note ? .noteId ,
202+ parentNotePath : note . noteId ,
199203 customOpts : {
204+ parentNoteUrl : note . noteId ,
200205 target : "after" ,
201206 targetBranchId : branchId ,
202- } as CreateNoteWithUrlOpts
207+ }
203208 } ) ;
204209 }
205210 } ,
@@ -210,9 +215,10 @@ export function showRowContextMenu(parentComponent: Component, e: MouseEvent, ro
210215 handler : ( ) => parentComponent ?. triggerCommand ( "addNewRow" , {
211216 parentNotePath : parentNoteId ,
212217 customOpts : {
218+ parentNoteUrl : parentNoteId ,
213219 target : "after" ,
214220 targetBranchId : rowData . branchId ,
215- } as CreateNoteWithUrlOpts
221+ }
216222 } )
217223 } ,
218224 { kind : "separator" } ,
0 commit comments