File tree Expand file tree Collapse file tree 4 files changed +15
-18
lines changed
Expand file tree Collapse file tree 4 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,13 @@ public static WebApplication CreateApi(string[]? args = null)
354354 foreach ( var file in filterFiles )
355355 {
356356 var name = Path . GetFileNameWithoutExtension ( file ) ;
357+
358+ // Skip unsaved/temp files
359+ if ( name . StartsWith ( "_UNSAVED_" , StringComparison . OrdinalIgnoreCase ) ||
360+ name . StartsWith ( "__TEMP_" , StringComparison . OrdinalIgnoreCase ) ||
361+ name . Contains ( "{unsaved}" , StringComparison . OrdinalIgnoreCase ) )
362+ continue ;
363+
357364 string filterJaml ;
358365 try
359366 {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ <h1 class="jaml-logo">JAML</h1>
251251stake: White</ textarea >
252252 < div class ="action-buttons ">
253253 < button id ="searchBtn " onclick ="toggleSearch() " class ="button-primary " style ="width: 120px; "> Start Search</ button >
254+ < button id ="saveBtn " onclick ="saveCurrentFilter() " class ="button-small " style ="width: 70px; "> Save</ button >
254255 < button id ="shareBtn " onclick ="shareSearch() " class ="button-small " style ="width: 70px; "> Share</ button >
255256 </ div >
256257 </ div >
Original file line number Diff line number Diff line change @@ -1095,8 +1095,13 @@ async function stopAllSearches() {
10951095 showStatus ( 'All searches stopped' ) ;
10961096 await loadFilters ( ) ;
10971097 } else {
1098- const err = await response . json ( ) ;
1099- showStatus ( `Error: ${ err . error || 'Failed to stop' } ` ) ;
1098+ // Handle empty or invalid JSON response
1099+ try {
1100+ const err = await response . json ( ) ;
1101+ showStatus ( `Error: ${ err . error || 'Failed to stop' } ` ) ;
1102+ } catch {
1103+ showStatus ( `Error: HTTP ${ response . status } ` ) ;
1104+ }
11001105 }
11011106 } catch ( e ) {
11021107 showStatus ( `Error: ${ e . message } ` ) ;
You can’t perform that action at this time.
0 commit comments