Don't insert duplicate codes in tracking history

This commit is contained in:
Skylar Ittner 2019-11-30 19:43:10 -07:00
parent 976f44a4f8
commit f3f3653d2c

View File

@ -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) {