Skip to content

Commit b4ff158

Browse files
committed
Fixes after testing with real-world files
1 parent 4a917a7 commit b4ff158

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/lib/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const isDevMode = process.env.NODE_ENV === 'development';
33

44
const DEMO_URL = isDevMode
5-
? "http://localhost:4000/newsblur.xml"
5+
? "http://localhost:4000/demo.xml"
66
: "https://opml.xml.style/demo.xml";
77

88
export const constants = {

src/lib/loadOutline.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ function processNode(retVal: OpmlData, parent: TreeItem, data: OpmlOutline[]) {
117117

118118
const newItem: TreeItem = {
119119
id: `ti-${retVal.count}`,
120-
label: item.title,
121-
htmlUrl: purifyUrl(item.htmlUrl),
120+
label: item.title || item.text || "",
121+
htmlUrl: purifyUrl(item.htmlUrl) || purifyUrl(item.url),
122122
xmlUrl: purifyUrl(item.xmlUrl),
123123
children: [],
124124
};

src/lib/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type OpmlOutline = {
1313
title: string;
1414
xmlUrl: string;
1515
htmlUrl: string;
16+
url: string;
1617
outline: OpmlOutline[] | OpmlOutline;
1718
}
1819

0 commit comments

Comments
 (0)