[FIX] mail: fix nextMentionRpcFunction

Before this PR, the `nextMentionRpcFunction` was always undefined and therefor
never used. This could lead to some RPC being lost if the previous one was too
slow.
This PR fix the issue by directly using the `rpcFunction` that is already assigned.

closes odoo/odoo#130292

X-original-commit: fff3323cb82fb51dbbe8ac6790479530bbc51ba9
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Didier (did)
2023-08-02 05:10:10 +02:00
parent fef71bac14
commit a1c079bbf1
@@ -112,8 +112,8 @@ export function useSuggestion() {
self.fetch.rpcFunction = undefined;
await func();
self.fetch.inProgress = false;
if (self.fetch.nextMentionRpcFunction) {
self.process(self.fetch.nextMentionRpcFunction);
if (self.fetch.rpcFunction) {
self.process(self.fetch.rpcFunction);
}
},
search: {