From 3502e7b19f6bd26dd589389b2f4e4367e2ff0949 Mon Sep 17 00:00:00 2001
From: tobias <thinkdifferent055@gmail.com>
Date: Fri, 29 Sep 2023 14:01:11 +0200
Subject: [PATCH] #187 - Cleanup pad trigger action

---
 actions.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/actions.js b/actions.js
index f66d62a..26b3da9 100644
--- a/actions.js
+++ b/actions.js
@@ -1,6 +1,6 @@
 module.exports = function (self) {
     self.setActionDefinitions({
-        sample_action: {
+        pad_trigger_action: {
             name: 'Trigger Pad',
             options: [
                 {
@@ -14,11 +14,11 @@ module.exports = function (self) {
                 const pad = self.currentProject.findPadByName(event.options.name);
                 if (!pad) {
                     self.log('warning', 'Cannot find a pad with name ' + event.options.name);
+                    return;
                 }
-                const payload = {
+                self.sendToWebSocket('cart-action', {
                     'pad': pad.id
-                };
-                self.sendToWebSocket('cart-action', payload)
+                });
             },
         },
     })
-- 
GitLab