1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-25 15:31:15 +02:00

Do not set '' for empty enum

This commit is contained in:
Jakub Vrana
2018-01-14 10:18:52 +01:00
parent 6d14b47d02
commit c57e7ac3e3

View 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';
}