Skip to content

Commit

Permalink
fix(web): fixed compilation with create-torrent #148
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Jul 11, 2021
1 parent 022b339 commit 678a999
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@
"react-plotly.js": "^2.5.1",
"simple-encryptor": "github:DEgITx/node-simple-encryptor",
"stun": "1.1.0",
"webtorrent": "github:DEgITx/webtorrent"
"webtorrent": "github:DEgITx/webtorrent",
"create-torrent": "3.33.0"
},
"devDependencies": {
"@babel/core": "^7.14.3",
Expand Down
4 changes: 3 additions & 1 deletion src/app/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import Search from './search'
import Tooltip from './tooltip'
import ContextMenu from './context-menu'

import createTorrent from 'create-torrent';
let createTorrent;
if(typeof WEB === 'undefined')
createTorrent = require('create-torrent')
import fs from 'fs'
let dialog
if(typeof WEB === 'undefined')
Expand Down

0 comments on commit 678a999

Please sign in to comment.