mirror of
https://github.com/liufree/obsidian-querydash.git
synced 2026-07-22 05:41:49 +00:00
fix: fix link func display
This commit is contained in:
parent
7a4be07dd1
commit
41c0f9fb65
1 changed files with 2 additions and 2 deletions
|
|
@ -26,8 +26,8 @@ export function formatValue(
|
|||
function formatObject(value: any) {
|
||||
const type = value.type;
|
||||
if (type === 'file') {
|
||||
const fileName = value.path.split('/').pop().replace(/\.md$/, '')
|
||||
return {type: "link", path: value.path, display: fileName};
|
||||
const display = value.display !== undefined ? value.display : value.path.split('/').pop().replace(/\.md$/, '');
|
||||
return {type: "link", path: value.path, display: display};
|
||||
}
|
||||
|
||||
if ("path" in value && "display" in value) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue