Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error on Windows caused by setBadge #867

Merged
merged 1 commit into from
Sep 1, 2016
Merged

Fix error on Windows caused by setBadge #867

merged 1 commit into from
Sep 1, 2016

Conversation

Goldob
Copy link
Contributor

@Goldob Goldob commented Sep 1, 2016

On each startup with npm start on Windows, the following error appears in the terminal:

TypeError: app.setBadgeCount is not a function
    at Object.setBadge (C:\Users\Goldob\Projekty\NodeJS\webtorrent-desktop\build\main\dock.js:37:7)
    at EventEmitter.ipc.on (C:\Users\Goldob\Projekty\NodeJS\webtorrent-desktop\build\main\ipc.js:52:43)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)
    at EventEmitter.ipc.emit (C:\Users\Goldob\Projekty\NodeJS\webtorrent-desktop\build\main\ipc.js:150:13)
    at EventEmitter.<anonymous> (C:\Users\Goldob\Projekty\NodeJS\webtorrent-desktop\node_modules\electron-prebuilt\dist\resources\electron.asar\browser\api\web-contents.js:156:13)
    at emitTwo (events.js:106:13)
    at EventEmitter.emit (events.js:191:7)

This PR fixes that by ensuring that we are running either Mac or Linux with Unity before calling the API.

@mathiasvr
Copy link
Contributor

LGTM

@dcposch dcposch merged commit 14102ab into webtorrent:master Sep 1, 2016
@lock lock bot locked as resolved and limited conversation to collaborators May 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants