refactor: use more appropriate array methods (#39321)
This commit is contained in:
parent
7686d1c379
commit
c5e50e4882
3 changed files with 5 additions and 5 deletions
|
@ -253,7 +253,7 @@ ifdescribe(process.platform !== 'linux')('cross-site frame sandboxing', () => {
|
|||
|
||||
const metrics = app.getAppMetrics();
|
||||
const isProcessSandboxed = function (pid: number) {
|
||||
const entry = metrics.filter(metric => metric.pid === pid)[0];
|
||||
const entry = metrics.find(metric => metric.pid === pid);
|
||||
return entry && entry.sandboxed;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue