File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed
Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -1401,12 +1401,8 @@ async function requestAllSpaces() {
14011401 const allSessions = await spacesService . getAllSessions ( ) ;
14021402 /** @type {Space[] } */
14031403 const allSpaces = allSessions
1404- . map ( session => {
1405- return { sessionId : session . id , ...session } ;
1406- } )
1407- . filter ( session => {
1408- return session && session . tabs && session . tabs . length > 0 ;
1409- } ) ;
1404+ . map ( session => { return { sessionId : session . id , ...session } } )
1405+ . filter ( session => session ?. tabs ?. length > 0 ) ;
14101406
14111407 // sort results
14121408 allSpaces . sort ( ( a , b ) => {
Original file line number Diff line number Diff line change @@ -85,7 +85,11 @@ function routeView(action) {
8585 */
8686
8787function renderCommon ( ) {
88- document . getElementById ( 'activeSpaceTitle' ) . value = globalCurrentSpace . name ?? UNSAVED_SESSION ;
88+ document . getElementById (
89+ 'activeSpaceTitle'
90+ ) . value = globalCurrentSpace . name
91+ ? globalCurrentSpace . name
92+ : UNSAVED_SESSION ;
8993
9094 document . querySelector ( 'body' ) . onkeyup = e => {
9195 // listen for escape key
@@ -219,7 +223,8 @@ export async function handleNameSave() {
219223 // to check for overwrite, we just let the capitalization change happen.
220224 // TESTME: Save should occur when the name is a case-insensitive match of the previous name and
221225 // the requestSessionPresence message should not be sent.
222- const caseInsensitiveMatch = globalCurrentSpace . name . toLowerCase ( ) === newName . toLowerCase ( ) ;
226+ const caseInsensitiveMatch = globalCurrentSpace ?. name
227+ && globalCurrentSpace . name . toLowerCase ( ) === newName . toLowerCase ( ) ;
223228 const canOverwrite = caseInsensitiveMatch || await checkSessionOverwrite ( newName ) ;
224229 if ( ! canOverwrite ) {
225230 inputEl . value = globalCurrentSpace . name || UNSAVED_SESSION ;
Original file line number Diff line number Diff line change @@ -332,7 +332,7 @@ export async function handleNameSave() {
332332 // name is a case-insensitive match of the previous name, we do not need to check overwrite.
333333 // TESTME: Save should occur when the name is a case-insensitive match of the previous name and
334334 // the requestSessionPresence message should not be sent.
335- const caseInsensitiveMatch = name . toLowerCase ( ) === newName . toLowerCase ( ) ;
335+ const caseInsensitiveMatch = name && name . toLowerCase ( ) === newName . toLowerCase ( ) ;
336336 const canOverwrite = caseInsensitiveMatch || await checkSessionOverwrite ( newName ) ;
337337 if ( ! canOverwrite ) {
338338 updateNameForm ( globalSelectedSpace ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " Spaces" ,
33 "description" : " Intuitive tab management" ,
4- "version" : " 1.1.8.1 " ,
4+ "version" : " 1.1.8.2 " ,
55 "permissions" : [
66 " contextMenus" ,
77 " downloads" ,
You can’t perform that action at this time.
0 commit comments