]> git.joonet.de Git - adminer.git/commitdiff
Do not set '' for empty enum
authorJakub Vrana <jakub@vrana.cz>
Sun, 14 Jan 2018 09:18:52 +0000 (10:18 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 14 Jan 2018 09:19:56 +0000 (10:19 +0100)
adminer/static/editing.js

index f3d964790830405d4f184889f50f627526cdb400..85308ef77a8a070d4e1fa1c36a0eeda215605090 100644 (file)
@@ -357,7 +357,7 @@ function editingLengthFocus() {
 function editingLengthBlur() {
        var field = this.parentNode.firstChild;
        var val = this.value;
-       field.value = (/^'[^\n]+'$/.test(val) ? val : "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'");
+       field.value = (/^'[^\n]+'$/.test(val) ? val : val && "'" + val.replace(/\n+$/, '').replace(/'/g, "''").replace(/\n/g, "','") + "'");
        field.style.display = 'inline';
        this.style.display = 'none';
 }