Skip to content

Commit d397e5a

Browse files
authored
Fix: allow renaming session when only capitalization changes (#31)
Co-authored-by: Aravind <[email protected]> for issue #31
1 parent fd7ed18 commit d397e5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/background/background.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,10 @@ async function handleImportNewSession(urlList) {
10241024
async function handleUpdateSessionName(sessionId, sessionName, deleteOld) {
10251025
// check to make sure session name doesn't already exist
10261026
const existingSession = await dbService.fetchSessionByName(sessionName);
1027+
// Fix: allow renaming when only capitalization is changed
1028+
if (existingSession && existingSession.id === sessionId) {
1029+
return spacesService.updateSessionName(sessionId, sessionName) ?? false;
1030+
}
10271031

10281032
// if session with same name already exist, then prompt to override the existing session
10291033
if (existingSession) {

0 commit comments

Comments
 (0)