fix(web): fixed compilation with create-torrent #148

This commit is contained in:
Alexey Kasyanchuk
2021-07-11 11:58:30 +03:00
parent 5a8ee5bd52
commit bceb070b74
3 changed files with 6 additions and 2 deletions

View File

@ -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')