Index: trunk/extensions/CodeReview/modules/ext.codereview.linecomment.js |
— | — | @@ -17,7 +17,10 @@ |
18 | 18 | * @param lineCode jQuery object |
19 | 19 | */ |
20 | 20 | lcShowForm: function( lineCode ) { |
21 | | - var htmlId = 'comment-for-' + lineCode.attr('id'); |
| 21 | + // Make sure the line id is an integer: |
| 22 | + var lineNumber = parseInt( lineCode.attr('id') ) + 0; |
| 23 | + // Forge the line comment HTML id: |
| 24 | + var htmlId = 'comment-for-' + lineNumber; |
22 | 25 | |
23 | 26 | lineCode.unbind( 'click' ); |
24 | 27 | lineCode.click( function () { |