From 261856582648e824b75035c9d9d3ffc3021f9fc5 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Wed, 6 Mar 2019 08:49:17 -0500 Subject: [PATCH] Make favorites list last in, first out --- modules/core/context.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/context.js b/modules/core/context.js index 072d1c549..f38b0cfbb 100644 --- a/modules/core/context.js +++ b/modules/core/context.js @@ -333,11 +333,11 @@ export function coreContext() { } else { // only allow 10 favorites if (favs.length === 10) { - // remove the last favorite (first in, first out) + // remove the last favorite (last in, first out) favs.pop(); } - // prepend array - favs.unshift({id: preset.id, geom: geom}); + // append array + favs.push({id: preset.id, geom: geom}); } setFavoritePresets(favs); };