mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
Fix JS warning with null div
.. in RideSummaryWindow we update to show progress of the model estimates, but it errors if the html is not set or is blank and does not contain the div 'modhead'.
This commit is contained in:
@@ -220,10 +220,10 @@ RideSummaryWindow::modelProgress(int year, int month)
|
||||
|
||||
#ifdef NOWEBKIT
|
||||
rideSummary->page()->runJavaScript(
|
||||
QString("var div = document.getElementById(\"modhead\"); div.innerHTML = '%1'; ").arg(string));;
|
||||
QString("var div = document.getElementById(\"modhead\"); if (div != null) div.innerHTML = '%1'; ").arg(string));;
|
||||
#else
|
||||
rideSummary->page()->mainFrame()->evaluateJavaScript(
|
||||
QString("var div = document.getElementById(\"modhead\"); div.innerHTML = '%1'; ").arg(string));;
|
||||
QString("var div = document.getElementById(\"modhead\"); if (div != null) div.innerHTML = '%1'; ").arg(string));;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user