mirror of
https://github.com/calfmoon/node-factor.git
synced 2026-07-22 05:42:24 +00:00
refactor: fix linting mistakes
This commit is contained in:
parent
aa0987082e
commit
a213c8b3c5
2 changed files with 7 additions and 8 deletions
13
src/main.ts
13
src/main.ts
|
|
@ -37,7 +37,7 @@ export default class NodeFactor extends Plugin {
|
|||
);
|
||||
}
|
||||
|
||||
async onunload() {}
|
||||
onunload() {}
|
||||
|
||||
private sizeCache: Map<string, number> = new Map();
|
||||
private timeoutId: NodeJS.Timeout;
|
||||
|
|
@ -105,13 +105,12 @@ export default class NodeFactor extends Plugin {
|
|||
const childNode: ObsidianNode = value.target;
|
||||
|
||||
// Prevents looping if A -> B -> C -> D -> B
|
||||
if (antiLoopSet.has(key)) return size;
|
||||
|
||||
size++;
|
||||
const childSize = this.fwdNodeTreeSize(childNode, antiLoopSet);
|
||||
size += childSize;
|
||||
if (!antiLoopSet.has(key)) {
|
||||
size++;
|
||||
const childSize = this.fwdNodeTreeSize(childNode, antiLoopSet);
|
||||
size += childSize;
|
||||
}
|
||||
});
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default class NodeFactorSettingTab extends PluginSettingTab {
|
|||
new Setting(containerEl)
|
||||
.setName("Character per weight")
|
||||
.setDesc(
|
||||
"Add 1 weight to node size per no of given Character (0 to disable).",
|
||||
"Add 1 weight to node size per no of given character (0 to disable).",
|
||||
)
|
||||
.addSlider((slider) =>
|
||||
slider
|
||||
|
|
|
|||
Loading…
Reference in a new issue