From 9e4b97c94e6d008f16a9f0ad2212df92a6728efa Mon Sep 17 00:00:00 2001 From: "ondrej.zara" Date: Tue, 26 May 2009 05:51:08 +0000 Subject: [PATCH] bugfix: js error when creating foreign key --HG-- extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4041 --- js/wwwsqldesigner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js index 638364e..b411a68 100644 --- a/js/wwwsqldesigner.js +++ b/js/wwwsqldesigner.js @@ -134,7 +134,7 @@ SQL.Row.prototype.mousedown = function(e) { } SQL.Row.prototype.update = function(data) { /* update subset of row data */ - if (data.nll && "def" in data && data.def.match(/^null$/i)) { data.def = null; } + if (data.nll && data.def && data.def.match(/^null$/i)) { data.def = null; } for (var p in data) { this.data[p] = data[p]; } if (!this.data.nll && this.data.def === null) { this.data.def = ""; }