Skip to content

Commit

Permalink
fix: ensure Electron.Utility property exists
Browse files Browse the repository at this point in the history
Added in electron#246, the Utility namespace currently has no concrete values in
it on electron/electron@main. This change ensures Electron.Utility is
available as a property even when the namespace has no values.
  • Loading branch information
devm33 committed Oct 25, 2023
1 parent 4b67b76 commit a3a0ea0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/primary-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export const generatePrimaryInterfaces = (
}
});

constDeclarations.push('const Utility: {};');

for (const interfaceKey of interfaceKeys) {
const alias = ` type ${interfaceKey} = Electron.${interfaceKey}`;
CommonNamespace.push(alias);
Expand Down

0 comments on commit a3a0ea0

Please sign in to comment.