Fossil SCM

Fix a (harmless) javascript error that occurs when the graph is empty.

drh 2011-08-07 22:52 trunk
Commit 303dd442feb8202318e6e7e09875f5c273a0ad8f
1 file changed +1 -1
+1 -1
--- src/timeline.c
+++ src/timeline.c
@@ -454,11 +454,11 @@
454454
/*
455455
** Generate all of the necessary javascript to generate a timeline
456456
** graph.
457457
*/
458458
void timeline_output_graph_javascript(GraphContext *pGraph, int omitDescenders){
459
- if( pGraph && pGraph->nErr==0 ){
459
+ if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
460460
GraphRow *pRow;
461461
int i;
462462
char cSep;
463463
@ <script type="text/JavaScript">
464464
@ /* <![CDATA[ */
465465
--- src/timeline.c
+++ src/timeline.c
@@ -454,11 +454,11 @@
454 /*
455 ** Generate all of the necessary javascript to generate a timeline
456 ** graph.
457 */
458 void timeline_output_graph_javascript(GraphContext *pGraph, int omitDescenders){
459 if( pGraph && pGraph->nErr==0 ){
460 GraphRow *pRow;
461 int i;
462 char cSep;
463 @ <script type="text/JavaScript">
464 @ /* <![CDATA[ */
465
--- src/timeline.c
+++ src/timeline.c
@@ -454,11 +454,11 @@
454 /*
455 ** Generate all of the necessary javascript to generate a timeline
456 ** graph.
457 */
458 void timeline_output_graph_javascript(GraphContext *pGraph, int omitDescenders){
459 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
460 GraphRow *pRow;
461 int i;
462 char cSep;
463 @ <script type="text/JavaScript">
464 @ /* <![CDATA[ */
465

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button