Skip to content

Commit

Permalink
lazily create nested elements for the camel editor so we can support …
Browse files Browse the repository at this point in the history
…editing nested objects
  • Loading branch information
jstrachan committed Apr 9, 2013
1 parent 3f82aac commit fbf0478
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hawtio-web/src/main/webapp/app/camel/js/helpers.ts
Expand Up @@ -86,11 +86,11 @@ module Camel {
if (angular.isObject(value)) {
// TODO deal with nested objects...
var nested = $(routeXmlNode).children(key);
if (nested && nested.length) {
setRouteNodeJSON(nested[0], value);
} else {
console.log("No nested element called " + key + " inside " + routeXmlNode);
if (!nested || !nested.length) {
nested = $("<" + key + "/>");
$(routeXmlNode).append(nested);
}
setRouteNodeJSON(nested[0], value);
} else {
if (value) {
var text = value.toString();
Expand Down

0 comments on commit fbf0478

Please sign in to comment.