Commit 22b203b2 authored by Boris Kocherov's avatar Boris Kocherov

use deleted flag for proper array item exclude in getContent values

getContent get information about arrays from dom, so parent get notification
before element deleted. use deleted flag solve this issue.
parent f658464a
...@@ -1833,6 +1833,7 @@ ...@@ -1833,6 +1833,7 @@
); );
} }
tasks.push(g.notifyInvalid([], g.element.getAttribute("data-gadget-scope"))); tasks.push(g.notifyInvalid([], g.element.getAttribute("data-gadget-scope")));
g.props.deleted = true;
return new RSVP.Queue() return new RSVP.Queue()
.push(function () { .push(function () {
return RSVP.all(tasks); return RSVP.all(tasks);
...@@ -2315,6 +2316,9 @@ ...@@ -2315,6 +2316,9 @@
.declareMethod('getContent', function () { .declareMethod('getContent', function () {
var g = this; var g = this;
if (g.props.deleted) {
return;
}
return getFormValuesAsJSONDict(g) return getFormValuesAsJSONDict(g)
.push(function (data) { .push(function (data) {
if (g.props.updatePropertySelectors) { if (g.props.updatePropertySelectors) {
......
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