Fossil SCM
Fix a (harmless) javascript error that occurs when the graph is empty.
Commit
303dd442feb8202318e6e7e09875f5c273a0ad8f
Parent
ef0b48de0d59ecf…
1 file changed
+1
-1
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -454,11 +454,11 @@ | ||
| 454 | 454 | /* |
| 455 | 455 | ** Generate all of the necessary javascript to generate a timeline |
| 456 | 456 | ** graph. |
| 457 | 457 | */ |
| 458 | 458 | void timeline_output_graph_javascript(GraphContext *pGraph, int omitDescenders){ |
| 459 | - if( pGraph && pGraph->nErr==0 ){ | |
| 459 | + if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){ | |
| 460 | 460 | GraphRow *pRow; |
| 461 | 461 | int i; |
| 462 | 462 | char cSep; |
| 463 | 463 | @ <script type="text/JavaScript"> |
| 464 | 464 | @ /* <![CDATA[ */ |
| 465 | 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 ){ |
| 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 |