Skip to content

Commit 964de3a

Browse files
Remove unnecessary Promise.all
1 parent 8117511 commit 964de3a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

static/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function() {
1+
(function () {
22
// Define the window start time before the requires so we get a more accurate
33
// window:start marker.
44
const startWindowTime = Date.now();
@@ -20,15 +20,13 @@
2020
}
2121
StartupTime.addMarker('window:start', startWindowTime);
2222

23-
window.onload = async function() {
23+
window.onload = async function () {
2424
try {
2525
StartupTime.addMarker('window:onload:start');
2626
const startTime = Date.now();
27-
await Promise.all([
28-
require('second-mate').ready
29-
])
27+
await require('second-mate').ready;
3028

31-
process.on('unhandledRejection', function(error, promise) {
29+
process.on('unhandledRejection', function (error, promise) {
3230
console.error(
3331
'Unhandled promise rejection %o with error: %o',
3432
promise,
@@ -120,7 +118,7 @@
120118

121119
StartupTime.addMarker('window:initialize:start');
122120

123-
return initialize({ blobStore: blobStore }).then(function() {
121+
return initialize({ blobStore: blobStore }).then(function () {
124122
StartupTime.addMarker('window:initialize:end');
125123
electron.ipcRenderer.send('window-command', 'window:loaded');
126124
});
@@ -130,7 +128,7 @@
130128
function profile() {
131129
console.profile('startup');
132130
const startTime = Date.now();
133-
setupWindow().then(function() {
131+
setupWindow().then(function () {
134132
setLoadTime(Date.now() - startTime + initialTime);
135133
console.profileEnd('startup');
136134
console.log(

0 commit comments

Comments
 (0)