Skip to content

Commit 14b1186

Browse files
committed
and more
1 parent 8acae52 commit 14b1186

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

helpers/NPMoveItems.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export async function moveItemToRegularNote(origFilename: string, paraContent: s
4444
if (!destNote) return null
4545

4646
// Ask to which heading to add the selectedParas
47-
const origNote = getNoteByFilename(origFilename)
4847
const headingToFind = await chooseHeading(destNote, true, true, false)
48+
const origNote = getNoteByFilename(origFilename)
4949
logDebug('moveItemToRegularNote', `- Moving from note '${displayTitle(origNote)}' to '${displayTitle(destNote)}' under heading: '${headingToFind}'`)
5050

5151
// If there's a >date in the line, ask whether to remove it
@@ -81,7 +81,6 @@ export async function moveItemToRegularNote(origFilename: string, paraContent: s
8181
const updatedDestNote = DataStore.updateCache(noteAfterChanges, false)
8282

8383
// delete from existing location
84-
const origNote = getNoteByFilename(origFilename)
8584
const origPara = findParaFromStringAndFilename(origFilename, paraContent)
8685
if (origNote && origPara) {
8786
logDebug('moveItemToRegularNote', `- Removing 1 para from original note ${origFilename}`)

0 commit comments

Comments
 (0)