diff options
Diffstat (limited to 'web/transaction.js')
-rw-r--r-- | web/transaction.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/transaction.js b/web/transaction.js index 26a8c35..8c91ff6 100644 --- a/web/transaction.js +++ b/web/transaction.js @@ -69,6 +69,9 @@ define( if (type.isTreeNode(data.meta) && !_.size(data.data)) data.data = type.isList(data.meta) ? [] : {}; + if (!_.isArray(data.meta.removable)) + data.meta.removable = []; + function index(name) { return _.isArray(data.data) ? name - 1 : name; } @@ -76,6 +79,8 @@ define( function ensureKeyPresence(name) { var key = index(name); if (!(key in data.data)) data.data[key] = null; + if (data.data[key] == null) + data.meta.removable.push(name); } function findSubordinateKeys(objmap, path) { |