Commit 8d250701 authored by Jérome Perrin's avatar Jérome Perrin

Make sure number properties are not Nan

parent cb978507
......@@ -163,7 +163,7 @@
prefixed_property_id = prefix + property.id;
property_element = $("#" + prefixed_property_id);
data[property.id] = property_element.val();
if (property.type === "number") {
if (property.type === "number" && data[property.id] !== "") {
data[property.id] = parseFloat(data[property.id])
}
} else if (property._class === "Dream.PropertyList") {
......@@ -252,7 +252,7 @@
if (property._class === "Dream.Property") {
prefixed_property_id = prefix + property.id;
properties[property.id] = $("#" + prefixed_property_id).val();
if (property.type === "number") {
if (property.type === "number" && properties[property.id] !== "") {
properties[property.id] = parseFloat(properties[property.id])
}
}
......
Markdown is supported
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