From: Wolfram Schneider Date: Mon, 3 Feb 2014 12:38:03 +0000 (+0000) Subject: Fix race condtion in my_onshow(), MKWS-105 X-Git-Tag: 1.0.0~1538 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=e1e6241171d921bdf2dddb603ef40422fe1b5519 Fix race condtion in my_onshow(), MKWS-105 call renderDetails(m_curDetRecData) only if the global variable m_curDetRecData is set. m_curDetRecData will be set in my_onrecord(), and apparently there is a race condtion that m_curDetRecData is not set yet, or will be reset in showDetails() later. This should fix MKWS-105 --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 6c014f8..b735cf6 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -271,7 +271,8 @@ function team($, teamName) { renderSummary(hit), ''); if (hit.recid == m_curDetRecId) { - html.push(renderDetails(m_curDetRecData)); + if (m_curDetRecData) + html.push(renderDetails(m_curDetRecData)); } } results.html(html.join(''));