Skip to content

Commit

Permalink
Merge pull request #5 from anyTV/VN-524_add_hanlding_network_interupt…
Browse files Browse the repository at this point in the history
…ions

bind also break the function
  • Loading branch information
huy2nhan authored Dec 6, 2018
2 parents 3a63e1c + b269566 commit f0c0254
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ module.exports.download = (win, url, options) => new Promise((resolve, reject) =
// Only need to register listener for new window/session
if (!sessionListenerMap.get(session)) {
sessionListenerMap.set(session, true);
session.on('will-download', registerListener.bind(this, session));
session.on('will-download', registerListener(session));
win.on('close', () => unregisterListener(session));
}

Expand Down

0 comments on commit f0c0254

Please sign in to comment.