mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: use more appropriate array methods (#39321)
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user