Skip to content

Commit

Permalink
form-string-array now auto-creates an empty array if there is none de…
Browse files Browse the repository at this point in the history
…fined; so that the add works
  • Loading branch information
jstrachan committed Oct 8, 2013
1 parent 0d613ba commit 45bbe6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hawtio-web/src/main/webapp/app/forms/js/baseDirectives.ts
Expand Up @@ -342,6 +342,12 @@ module Forms {
var ignorePrefixInLabel = true;
var configScopeName = null;

// lets create an empty array if its not yet set
var value = Core.pathGet(scope, modelName);
if (!value) {
Core.pathSet(scope, modelName, []);
}

// lets avoid passing in the config as it tends to use "entity.id" then
// whereas we are editing an inscope variable called rowScopeName here:
var itemsConfig = {
Expand Down

0 comments on commit 45bbe6e

Please sign in to comment.