correctly check if x and y are defined
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 22 Jan 2018 12:45:58 +0000 (13:45 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 22 Jan 2018 12:45:58 +0000 (13:45 +0100)
public/edit_table.js

index 9914a3c..f57f833 100644 (file)
@@ -16,7 +16,7 @@ var cell_blur = function() {
        var x = $(this).parent().index();
        var y = $(this).parent().parent().index();
 
        var x = $(this).parent().index();
        var y = $(this).parent().parent().index();
 
-       if ( ! x || ! y ) {
+       if ( x == null || y == null ) {
                console.error('no x ', x, ' or y ', y, ' defined');
                return;
        }
                console.error('no x ', x, ' or y ', y, ' defined');
                return;
        }