From f3f3653d2cf033b205b5ca25e5f49fd62841bddb Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 30 Nov 2019 19:43:10 -0700 Subject: [PATCH] Don't insert duplicate codes in tracking history --- www/assets/js/toolbox_track.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/assets/js/toolbox_track.js b/www/assets/js/toolbox_track.js index 1551736..968950a 100644 --- a/www/assets/js/toolbox_track.js +++ b/www/assets/js/toolbox_track.js @@ -94,7 +94,7 @@ function openTrackingHistory(code) { } else { history = JSON.parse(history); } - if (infocontext.code != "") { + if (infocontext.code != "" && !history.includes(infocontext.code)) { history.push(infocontext.code); } while (history.length > 5) {