mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 10:13:31 +00:00
Hide dock icon, handle errors occurring on mac
This commit is contained in:
@@ -186,6 +186,14 @@ export class Main {
|
||||
|
||||
console.error(process.argv);
|
||||
if (process.argv.some(arg => arg.indexOf('chrome-extension://') !== -1 || arg.indexOf('{') !== -1)) {
|
||||
app.on('ready', () => {
|
||||
app.dock.hide();
|
||||
});
|
||||
process.stdout.on('error', (e) => {
|
||||
if (e.code === 'EPIPE') {
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
const proxy = new NativeMessagingProxy();
|
||||
proxy.run();
|
||||
} else {
|
||||
|
||||
@@ -45,7 +45,12 @@ export default class NativeMessage {
|
||||
// The next time we'll need to read the payload size is when all of the data
|
||||
// of the current payload has been read (ie. data.length >= payloadSize + 4)
|
||||
if (!sizeHasBeenRead()) {
|
||||
payloadSize = stringData.readUInt32LE(0);
|
||||
try {
|
||||
payloadSize = stringData.readUInt32LE(0);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If the data we have read so far is >= to the size advertised in the header,
|
||||
|
||||
Reference in New Issue
Block a user