Merge branch 'bug_pairing_not_my_processes' into dev
This commit is contained in:
commit
0dd928d28b
@ -1509,15 +1509,22 @@ export default class Services {
|
||||
|
||||
public async getMyProcesses(): Promise<string[] | null> {
|
||||
// If we're not paired yet, just skip it
|
||||
let pairingProcessId = null;
|
||||
try {
|
||||
this.getPairingProcessId();
|
||||
pairingProcessId = this.getPairingProcessId();
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
if (!pairingProcessId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const processes = await this.getProcesses();
|
||||
|
||||
const newMyProcesses = new Set<string>(this.myProcesses || []);
|
||||
// MyProcesses automatically contains pairing process
|
||||
newMyProcesses.add(pairingProcessId);
|
||||
for (const [processId, process] of Object.entries(processes)) {
|
||||
// We use myProcesses attribute to not reevaluate all processes everytime
|
||||
if (newMyProcesses.has(processId)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user