refactor: use more appropriate array methods (#39321)

This commit is contained in:
Milan Burda 2023-08-02 19:43:45 +02:00 committed by GitHub
parent 7686d1c379
commit c5e50e4882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -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;
};