Skip to content

Commit a809f28

Browse files
author
Ville Jyrkkä
committed
comments
1 parent 459699e commit a809f28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

proxy_backends/client/form/autoform.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,13 @@ AutoForm.hooks({
132132
const previousProxyId = proxyBackendFromMongo.proxyId;
133133
const currentProxyId = currentProxyBackend.proxyId;
134134

135-
// TODO: In multi-proxy case. After changing proxy, onSuccess hook happens faster then umbrella id is got.
136135
// Check: if user changed proxy
137136
if (previousProxyId === currentProxyId) {
137+
// Case 1: Proxy not changed, return modifier
138138
updateDoc.$set = currentProxyBackend;
139139
form.result(updateDoc);
140140
} else {
141+
// Case 2: Proxy changed
141142
// Delete information about proxy backend from the first proxy and insert in the
142143
Meteor.call('deleteProxyBackend',
143144
proxyBackendFromMongo, false,
@@ -185,7 +186,7 @@ AutoForm.hooks({
185186
// async return false;
186187
form.result(false);
187188
}
188-
// sync return the Proxy Backend document
189+
// async return the Proxy Backend document
189190
updateDoc.$set = convertedProxyBackend;
190191
form.result(updateDoc);
191192
}

0 commit comments

Comments
 (0)