From b399258dec5bc67a69dc490592e23a0a9b7510d3 Mon Sep 17 00:00:00 2001 From: carson Date: Fri, 2 Jul 2021 13:12:54 -0600 Subject: [PATCH] only set the value if there is a name on the button --- src/htmx.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/htmx.js b/src/htmx.js index 0b892103..d77e4a29 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -1798,8 +1798,9 @@ return (function () { var internalData = getInternalData(elt); if (internalData.lastButtonClicked) { var name = getRawAttribute(internalData.lastButtonClicked,"name"); - var value = internalData.lastButtonClicked.value; - values[name] = value; + if (name) { + values[name] = internalData.lastButtonClicked.value; + } } // include any explicit includes