From 0f086d87e349c63380b0687f7704b5ce480a160f Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Wed, 30 Dec 2015 14:44:20 +0000 Subject: [PATCH] Fix deleting player --- bridge_results_table.js | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bridge_results_table.js b/bridge_results_table.js index e75fbd2..197ce0e 100644 --- a/bridge_results_table.js +++ b/bridge_results_table.js @@ -99,15 +99,11 @@ }; ResultsTable.prototype._editPlayerCallback = function(name, callback) { var result = prompt('Podaj nowe inicjały gracza. Wyczyść pole, by go usunąć.', name); - if(result) { - callback(result); - } + callback(result); }; ResultsTable.prototype._editResultCallback = function(value, callback) { var result = prompt('Podaj nową wartość:', value); - if(result) { - callback(result); - } + callback(result); }; ResultsTable.prototype.refresh = function() { this.save(); @@ -144,6 +140,7 @@ self.editResultCallback( self.results[j][i], function (value) { + if(value == null) return; self.results[j][i] = value; self.refresh(); } -- Gitblit v1.9.1