* The ID of the section to remove.
*/
remove: function(conf, sid) {
- var n = this.state.creates,
+ var v = this.state.values,
+ n = this.state.creates,
c = this.state.changes,
d = this.state.deletes;
if (n[conf] && n[conf][sid]) {
delete n[conf][sid];
}
- else {
+ else if (v[conf] && v[conf][sid]) {
if (c[conf])
delete c[conf][sid];
pkgs = { },
tasks = [];
+ if (d)
+ for (var conf in d) {
+ for (var sid in d[conf]) {
+ var o = d[conf][sid];
+ tasks.push(self.callDelete(conf, sid, (o === true) ? null : o));
+ }
+
+ pkgs[conf] = true;
+ }
+
if (n)
for (var conf in n) {
for (var sid in n[conf]) {
pkgs[conf] = true;
}
- if (d)
- for (var conf in d) {
- for (var sid in d[conf]) {
- var o = d[conf][sid];
- tasks.push(self.callDelete(conf, sid, (o === true) ? null : o));
- }
-
- pkgs[conf] = true;
- }
-
if (r)
for (var conf in r)
pkgs[conf] = true;