File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,7 @@ export default class TabManager extends Component {
265265 mainNtxId : string | null = null
266266 ) : Promise < NoteContext > {
267267 const noteContext = new NoteContext ( ntxId , hoistedNoteId , mainNtxId ) ;
268+ noteContext . setEmpty ( ) ;
268269
269270 const existingNoteContext = this . children . find ( ( nc ) => nc . ntxId === noteContext . ntxId ) ;
270271
Original file line number Diff line number Diff line change @@ -278,6 +278,7 @@ async function getCorrespondingWidget(type: ExtendedNoteType): Promise<null | Ty
278278}
279279
280280async function getWidgetType ( note : FNote | null | undefined , noteContext : NoteContext | undefined ) : Promise < ExtendedNoteType | undefined > {
281+ if ( ! noteContext ) return undefined ;
281282 if ( ! note ) {
282283 // If the note is null, then it's a new tab. If it's undefined, then it's not loaded yet.
283284 return note === null ? "empty" : undefined ;
You can’t perform that action at this time.
0 commit comments