We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 412c2a7 commit 1843922Copy full SHA for 1843922
1 file changed
src/js/performance.js
@@ -463,8 +463,15 @@ export class FilterCache {
463
* Generate cache key from filter values
464
*/
465
generateKey(filters) {
466
- // Create a stable string representation of filters
467
- return JSON.stringify(filters, Object.keys(filters).sort());
+ // Build a canonical object: keys sorted alphabetically, array values sorted
+ // so that logically identical filters always produce the same key regardless
468
+ // of insertion order or multi-select ordering.
469
+ const sorted = {};
470
+ for (const key of Object.keys(filters).sort()) {
471
+ const val = filters[key];
472
+ sorted[key] = Array.isArray(val) ? [...val].sort() : val;
473
+ }
474
+ return JSON.stringify(sorted);
475
}
476
477
/**
0 commit comments