Skip to content

Commit 662fb4f

Browse files
committed
1.0.3
1 parent 163c3c9 commit 662fb4f

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.0.3
2+
3+
- Some dropped notes could have their label set to undefined.
4+
15
# 1.0.2
26

37
- v13 fixes for v13 public release.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "notelicker",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"author": "MrPrimate",
55
"description": "Foundry VTT module for enhancing notes and their icons",
66
"private": true,

src/hooks/anchorInjection.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ export function anchorInjection() {
123123
// the anchor name and set the slug value to the anchor slug
124124
Hooks.once("renderNoteConfig", (noteConfig, form, app) => {
125125
const titleInput = form.querySelector("input[name='text']");
126-
if (dropData.anchor.slug) {
126+
if (dropData.anchor.slug && dropData.anchor.name) {
127127
titleInput.setAttribute('value', dropData.anchor.name);
128128
updateNotePage(noteConfig, dropData.anchor.slug);
129-
} else {
129+
} else if (app.document.pageId) {
130+
titleInput.setAttribute('value', app.pages[app.document.pageId] ?? "");
131+
} else if (app.label) {
130132
titleInput.setAttribute('value', app.label);
131133
}
132134
});

0 commit comments

Comments
 (0)