Skip to content

Commit f5f44a2

Browse files
committed
correctly use user config
1 parent e5c0ceb commit f5f44a2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

logseq-opml-drummer/index.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ const saveOpmlFile = async (
6565
};
6666

6767
const opmlFromParentPageName = async (
68-
parentPageName: string
68+
parentPageName: string,
69+
userConfig: { [key: string]: any } = { ...baseConfig }
6970
): Promise<OPML> => {
71+
// TODO this should be userConfig, not baseConfig
7072
let outline = helpers.setupOpmlHead(
7173
{
7274
opml: {
7375
head: {},
7476
body: {},
7577
},
7678
},
77-
baseConfig
79+
userConfig
7880
);
7981

8082
// #TODO optionally only fetch n days back
@@ -154,8 +156,13 @@ function main(baseInfo: LSPluginBaseInfo) {
154156
const userConfig = baseInfo?.settings;
155157
const fullConfig = { ...baseConfig, ...userConfig };
156158

159+
console.log("baseConfig", baseConfig);
160+
console.log("userConfig", userConfig);
161+
console.log("fullConfig", fullConfig);
162+
157163
const opmlFromBlocks = await opmlFromParentPageName(
158-
fullConfig.parentBlogTag
164+
fullConfig.parentBlogTag,
165+
fullConfig
159166
);
160167

161168
if (fullConfig.saveOpmlFile) {

0 commit comments

Comments
 (0)