Skip to content

Commit

Permalink
top directory check
Browse files Browse the repository at this point in the history
  • Loading branch information
cosminz committed Apr 15, 2020
1 parent c084aa7 commit 86baa45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion init.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ plugin.ui.handleTorrentFilesMenu = function (e, selected) {
var fid = table.getFirstSelected();
var selectIsDir = theWebUI.dirs[theWebUI.dID].isDirectory(fid);

var selectedName = selectIsDir ? selected.name += '/' : selected.name;
var selectedName = selected
? selectIsDir ? selected.name += '/' : selected.name
: '/';

var selectedTorrent = theWebUI.dID && $type(theWebUI.torrents[theWebUI.dID])
? theWebUI.torrents[theWebUI.dID]
Expand Down

0 comments on commit 86baa45

Please sign in to comment.