Skip to content

Commit 860db5f

Browse files
committed
fix button validator
1 parent 1a055b9 commit 860db5f

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

exampleVault/Advanced Use-Cases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ list:
33
- 1
44
- 2
55
- 3
6-
index: 0
6+
index: 2
77
options:
88
- "1"
99
- "2"

exampleVault/Button Example.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
count: 0
2+
count: 4
33
---
44
Meta Bind is getting Buttons
55

src/config/ButtonConfigValidators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const V_UpdateMetadataButtonAction = schemaForType<UpdateMetadataButtonAc
6464
type: z.literal(ButtonActionType.UPDATE_METADATA),
6565
bindTarget: z.string(),
6666
evaluate: z.boolean(),
67-
value: z.string(),
67+
value: z.coerce.string(),
6868
}),
6969
);
7070

src/metadata/MetadataManager.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,6 @@ export class MetadataManager {
792792
cacheItem.inactive = false;
793793
cacheItem.cyclesSinceInactive = 0;
794794

795-
// TODO: remove
796-
console.log('meta-bind | MetadataManager >> subscribed', subscription, cacheItem);
797-
798795
subscription.notify(source.readCacheItem(cacheItem, subscription.bindTarget.storageProp));
799796
}
800797

src/metadata/ObsidianMetadataSource.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ export class ObsidianMetadataSource extends FilePathMetadataSource<ObsidianMetad
3636

3737
const frontmatter = this.plugin.app.metadataCache.getFileCache(file)?.frontmatter;
3838

39-
// TODO: remove
40-
console.log('meta-bind | Obs Source >> default cache', structuredClone(frontmatter), storagePath);
39+
console.log('meta-bind | Obs Source >> loaded frontmatter', structuredClone(frontmatter), storagePath);
4140

4241
return {
4342
data: structuredClone(frontmatter) ?? {},

0 commit comments

Comments
 (0)