From a7e142f28ba9e41620c9408c58a5a3ee89807fb8 Mon Sep 17 00:00:00 2001 From: koksnuss Date: Mon, 11 May 2020 14:13:40 +0200 Subject: [PATCH] add checks for #found, belongs to #14 --- coinmanager/coinc/static/coinc/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coinmanager/coinc/static/coinc/main.js b/coinmanager/coinc/static/coinc/main.js index f9a4b5b..0a3a01b 100644 --- a/coinmanager/coinc/static/coinc/main.js +++ b/coinmanager/coinc/static/coinc/main.js @@ -115,7 +115,7 @@ function render_response(td, set) { td_class = 'rare'; } else if ([10, 20, 50].includes(Number($(td).attr('value')))) { td_class = 'brass'; - } else if (set['found_by']) { + } else if (set['found'] && set['found_by']) { td_class = 'found'; } @@ -129,7 +129,7 @@ function render_response(td, set) { div_class = set['found_by']; $(td).find('div.coin span').html('').html('x'); } - if (!set['exists']) { + if (!set['exists'] || !set['found']) { $(td).find('div.coin span').html(''); } $(td).removeClass();