diff --git a/node_modules/alpinejs/dist/cdn.js b/node_modules/alpinejs/dist/cdn.js
index 6bf6d74..11a3320 100644
--- a/node_modules/alpinejs/dist/cdn.js
+++ b/node_modules/alpinejs/dist/cdn.js
@@ -561,7 +561,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
       func.finished = false;
       let completeScope = mergeProxies([scope2, ...dataStack]);
       if (typeof func === "function") {
-        let promise = func.call(context, func, completeScope).catch((error2) => handleError(error2, el, expression));
+        let callResult = func.call(context, func, completeScope);
+        let promise = callResult && typeof callResult.then === "function" && typeof callResult.catch === "function" ? callResult.catch((error2) => handleError(error2, el, expression)) : Promise.resolve(callResult);
         if (func.finished) {
           runIfTypeOfFunction(receiver, func.result, completeScope, params, el);
           func.result = void 0;
diff --git a/node_modules/alpinejs/dist/module.cjs.js b/node_modules/alpinejs/dist/module.cjs.js
index 8cc2f4f..350cb0c 100644
--- a/node_modules/alpinejs/dist/module.cjs.js
+++ b/node_modules/alpinejs/dist/module.cjs.js
@@ -1,4 +1,4 @@
-var __create = Object.create;
+/* ALPINEJS_PATCH_TEST_42 */ var __create = Object.create;
 var __defProp = Object.defineProperty;
 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
 var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1975,7 +1975,8 @@ function generateEvaluatorFromString(dataStack, expression, el) {
     func.finished = false;
     let completeScope = mergeProxies([scope2, ...dataStack]);
     if (typeof func === "function") {
-      let promise = func.call(context, func, completeScope).catch((error2) => handleError(error2, el, expression));
+      let callResult = func.call(context, func, completeScope);
+      let promise = callResult && typeof callResult.then === "function" && typeof callResult.catch === "function" ? callResult.catch((error2) => handleError(error2, el, expression)) : Promise.resolve(callResult);
       if (func.finished) {
         runIfTypeOfFunction(receiver, func.result, completeScope, params, el);
         func.result = void 0;
diff --git a/node_modules/alpinejs/dist/module.esm.js b/node_modules/alpinejs/dist/module.esm.js
index e52c781..3af5d36 100644
--- a/node_modules/alpinejs/dist/module.esm.js
+++ b/node_modules/alpinejs/dist/module.esm.js
@@ -560,7 +560,8 @@ function generateEvaluatorFromString(dataStack, expression, el) {
     func.finished = false;
     let completeScope = mergeProxies([scope2, ...dataStack]);
     if (typeof func === "function") {
-      let promise = func.call(context, func, completeScope).catch((error2) => handleError(error2, el, expression));
+      let callResult = func.call(context, func, completeScope);
+      let promise = callResult && typeof callResult.then === "function" && typeof callResult.catch === "function" ? callResult.catch((error2) => handleError(error2, el, expression)) : Promise.resolve(callResult);
       if (func.finished) {
         runIfTypeOfFunction(receiver, func.result, completeScope, params, el);
         func.result = void 0;
diff --git a/node_modules/alpinejs/src/evaluator.js b/node_modules/alpinejs/src/evaluator.js
index fa76422..07af8d7 100644
--- a/node_modules/alpinejs/src/evaluator.js
+++ b/node_modules/alpinejs/src/evaluator.js
@@ -125,7 +125,10 @@ function generateEvaluatorFromString(dataStack, expression, el) {
         let completeScope = mergeProxies([ scope, ...dataStack ])
 
         if (typeof func === 'function' ) {
-            let promise = func.call(context, func, completeScope).catch((error) => handleError(error, el, expression))
+            let callResult = func.call(context, func, completeScope)
+            let promise = callResult && typeof callResult.then === 'function' && typeof callResult.catch === 'function'
+                ? callResult.catch((error) => handleError(error, el, expression))
+                : Promise.resolve(callResult)
 
             // Check if the function ran synchronously,
             if (func.finished) {
