Commit 1b12d1e1 authored by Stefano Crocco's avatar Stefano Crocco
Browse files

Use field id instead of name if name is empty

parent 7e58be87
...@@ -95,7 +95,7 @@ function objectFromElement(el) { ...@@ -95,7 +95,7 @@ function objectFromElement(el) {
var obj = new Object; var obj = new Object;
obj.id = String(el.id); obj.id = String(el.id);
obj.name = el.name; obj.name = el.name;
if (typeof(obj.name) != 'string') { if (typeof(obj.name) != 'string' || obj.name.length == 0) {
obj.name = obj.id; obj.name = obj.id;
} }
if (obj.name.length == 0) { if (obj.name.length == 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment