fix(idaa): harden data sync against padStart crashes and fix Archive Content sort
- Hardened object processors in Archives and Posts modules to safely handle null 'sort' values, preventing runtime TypeErrors during data synchronization. - Fixed inconsistent sorting in Archive Content list by correctly implementing descending order (sort then reverse) and adding a configuration loading guard to the liveQuery. - Standardized safe data processing patterns in SVELTE_DEXIE_GUIDE.md. - Performed minor cleanup and visibility logic hardening in Recovery Meetings module.
This commit is contained in:
@@ -360,11 +360,12 @@ export async function process_ae_obj__post_comment_props({
|
||||
obj_type: 'post_comment',
|
||||
log_lvl,
|
||||
specific_processor: (obj) => {
|
||||
const sort_val = (obj.sort ?? 0).toString().padStart(3, '0');
|
||||
obj.tmp_sort_1 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
|
||||
obj.sort?.toString().padStart(3, '0') ?? ''
|
||||
sort_val
|
||||
}_${obj.updated_on ?? obj.created_on}`;
|
||||
obj.tmp_sort_2 = `${obj.group ?? ''}_${obj.priority ? '1' : '0'}_${
|
||||
obj.sort?.toString().padStart(2, '0') ?? ''
|
||||
(obj.sort ?? 0).toString().padStart(2, '0')
|
||||
}_${obj.updated_on}_${obj.created_on}`;
|
||||
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user