diff --git a/templates/note/transaction_form.html b/templates/note/transaction_form.html
index 553d289c..dc83c171 100644
--- a/templates/note/transaction_form.html
+++ b/templates/note/transaction_form.html
@@ -99,7 +99,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
});
$("#transfer").click(function() {
- if (sources.length === 0) {
+ if (sources_notes_display.length === 0) {
dests_notes_display.forEach(function (dest) {
$.post("/api/note/transaction/transaction/",
{