diff --git a/package.json b/package.json index 3e5a60a2..f7e128b8 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "chromecasts": "^1.9.1", "create-torrent": "^4.4.1", "debounce": "^1.2.0", - "deep-equal": "^1.1.0", "dlnacasts": "^0.1.0", "drag-drop": "^6.0.0", "es6-error": "^4.1.1", diff --git a/src/renderer/webtorrent.js b/src/renderer/webtorrent.js index 7b42dacd..42c10343 100644 --- a/src/renderer/webtorrent.js +++ b/src/renderer/webtorrent.js @@ -3,7 +3,7 @@ console.time('init') const crypto = require('crypto') -const deepEqual = require('deep-equal') +const util = require('util') const defaultAnnounceList = require('create-torrent').announceList const electron = require('electron') const fs = require('fs') @@ -249,7 +249,7 @@ function generateTorrentPoster (torrentKey) { function updateTorrentProgress () { const progress = getTorrentProgress() // TODO: diff torrent-by-torrent, not once for the whole update - if (prevProgress && deepEqual(progress, prevProgress, { strict: true })) { + if (prevProgress && util.isDeepStrictEqual(progress, prevProgress)) { return /* don't send heavy object if it hasn't changed */ } ipc.send('wt-progress', progress)