Skip to content

Commit

Permalink
fix(main): check if error is string
Browse files Browse the repository at this point in the history
fixes #31
  • Loading branch information
ritz078 committed Aug 16, 2017
1 parent 8a96ea0 commit b660bfc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions main/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { app, BrowserWindow, Menu } = require('electron');
const { app, BrowserWindow, Menu, autoUpdater } = require('electron');
const getPort = require('get-port');
const fixPath = require('fix-path');
const dev = require('electron-is-dev');
Expand All @@ -13,8 +13,15 @@ if (dev) {
require('electron-debug')();
}

if (!dev) {
const updateServer = 'https://hazel-xzdrgzprqt.now.sh';
const feed = `${updateServer}/update/${process.platform}/${app.getVersion()}`;

autoUpdater.setFeedURL(feed);
}

process.on('unhandledRejection', (error) => {
if (!error.includes('Database maintenance')) {
if (error && typeof error === 'string' && !error.includes('Database maintenance')) {
logError(error);
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snape",
"version": "0.2.1",
"version": "0.2.2",
"description": "A torrent client to search, stream and download torrents. Play music, view images and stream videos.",
"engines": {
"node": ">=6"
Expand Down

0 comments on commit b660bfc

Please sign in to comment.