File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ function submit() {
3535 const titleValue = titleInput . value . trim ( ) ;
3636 const authorValue = authorInput . value . trim ( ) ;
3737 const pagesValue = Number ( pagesInput . value ) ;
38- if ( ! titleValue || ! authorValue || ! Number . isFinite ( pagesValue ) || pagesValue <= 0 ) {
38+ if ( ! titleValue || ! authorValue || ! Number . isInteger ( pagesValue ) || pagesValue <= 0 ) {
3939 alert ( "Please fill all fields!" ) ;
4040 return ;
4141 } else {
@@ -89,7 +89,7 @@ function render() {
8989
9090 //add delete button to every row and render again
9191
92- let deleteBut = document . createElement ( "button" ) ;
92+ const deleteBut = document . createElement ( "button" ) ;
9393 deleteCell . appendChild ( deleteBut ) ;
9494 deleteBut . className = "btn btn-warning" ;
9595 deleteBut . textContent = "Delete" ;
You can’t perform that action at this time.
0 commit comments