File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/twirl/gitbucket/gist Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ <h1 style="margin: 0px;">New snippet</h1>
8181 } ) ;
8282
8383 $ ( '#add_file' ) . click ( function ( ) {
84- var count = $ ( '#count' ) . val ( ) ;
84+ var count = parseInt ( $ ( '#count' ) . val ( ) ) ;
8585 $ . get ( '@path/gist/_add?count=' + count , function ( html ) {
8686 $ ( '#editors' ) . append ( html ) ;
8787 $ ( '#count' ) . val ( count + 1 ) ;
@@ -95,7 +95,7 @@ <h1 style="margin: 0px;">New snippet</h1>
9595 } ) ;
9696
9797 $ ( '.submit_snippet' ) . click ( function ( ) {
98- var count = $ ( '#count' ) . val ( ) ;
98+ var count = parseInt ( $ ( '#count' ) . val ( ) ) ;
9999 if ( count == 0 ) {
100100 displayError ( 'File is required.' ) ;
101101 return false ;
@@ -130,4 +130,4 @@ <h1 style="margin: 0px;">New snippet</h1>
130130 }
131131 } ) ;
132132 </ script >
133- }
133+ }
You can’t perform that action at this time.
0 commit comments