From 4f34e2843141e94fded3b46004be77a3ea428725 Mon Sep 17 00:00:00 2001 From: Martin Raifer Date: Fri, 23 Sep 2022 15:01:57 +0200 Subject: [PATCH] don't return hidden presets in recent --- CHANGELOG.md | 1 + modules/presets/index.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64d96ff84..432c76107 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ _Breaking developer changes, which may affect downstream projects or sites that * Better fallback icons for untagged points, vertices, lines and areas ([#9157]) * Add fallback values for access field for barrier presets * Support incrementing cardinal directions with the up/down buttons ([#9141], thanks [@k-yle]) +* Don't suggest (newly) hidden presets in preset selection list #### :hammer: Development * Reduce uses of unsafe html injecting code * Upgrade dependencies: maki to `v8.0`, `osm-community-index` to `v5.2`, `d3` to `v7.6`, `togeojson` to `v5.2`, `mocha` to `v10` diff --git a/modules/presets/index.js b/modules/presets/index.js index 4a13a0ce7..c0b4c9358 100644 --- a/modules/presets/index.js +++ b/modules/presets/index.js @@ -440,7 +440,9 @@ export function presetIndex() { _this.recent = () => { return presetCollection( - utilArrayUniq(_this.getRecents().map(d => d.preset)) + utilArrayUniq(_this.getRecents() + .map(d => d.preset) + .filter(d => d.searchable !== false)) ); };