File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,11 +40,9 @@ $(document).ready(function () {
4040 e . preventDefault ( )
4141 notify ( 'Update' , 'Checking for update.' , 'info' )
4242 $ . getJSON ( WEBDIR + 'update/' , function ( data ) {
43- if ( data == null || ! $ . isNumeric ( data [ 0 ] ) || data [ 0 ] < 0 ) {
44- notify ( 'Update' , 'Failed. Check errorlog.' , 'error' )
45- } else if ( data [ 0 ] == 0 ) {
43+ if ( data == 0 ) {
4644 notify ( 'Update' , 'Already running latest version.' , 'success' )
47- } else {
45+ } else if ( $ . isNumeric ( data [ 0 ] && data [ 0 ] > 0 ) ) {
4846 if ( confirm ( 'Your are ' + data [ 0 ] + ' versions behind. Update to latest version?' ) ) {
4947 $ . post ( WEBDIR + 'update/' , function ( data ) {
5048 if ( data == 1 ) {
@@ -56,6 +54,8 @@ $(document).ready(function () {
5654 checkUpdate ( )
5755 } )
5856 }
57+ } else {
58+ notify ( 'Update' , 'Failed. Check errorlog.' , 'error' )
5959 }
6060 } )
6161 } )
You can’t perform that action at this time.
0 commit comments