Skip to content

Commit a377568

Browse files
committed
Fix compatibility with transmission older than 3.0
1 parent e54faf1 commit a377568

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/server.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function Server({ hostname, tabsRef, toolbarExtra, toggleTabStrip }: Serv
118118
const searchFilter = useCallback((t: Torrent) => {
119119
const name = t.name.toLowerCase() as string;
120120
const path = t.downloadDir.toLowerCase() as string;
121-
const labels = (t.labels.map((l: string) => l.toLowerCase()) as string[]).join(" ");
121+
const labels = ((t.labels ?? []).map((l: string) => l.toLowerCase()) as string[]).join(" ");
122122
for (const term of searchTerms) {
123123
if (term.startsWith("path:") || term.startsWith("path=")) { if (!path.includes(term.slice(5))) return false; }
124124
else if (term.startsWith("label:") || term.startsWith("label=")) { if (!labels.includes(term.slice(6))) return false; }

webpack.common.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ await writeFile(path.resolve(path.join(__dirname, "src/build/version.json")), ve
4343

4444
export default (mode) => ({
4545
mode,
46+
cache: {
47+
type: "filesystem",
48+
allowCollectingMemory: true,
49+
},
4650
entry: {
4751
main: "./src/index.tsx",
4852
createtorrent: "./src/createtorrent.tsx",

0 commit comments

Comments
 (0)