-
+
-
diff --git a/src/store/macros/getters.ts b/src/store/macros/getters.ts
index 6cf299b7a0..c4362076a6 100644
--- a/src/store/macros/getters.ts
+++ b/src/store/macros/getters.ts
@@ -47,6 +47,12 @@ export const getters: GetterTree = {
return macros
},
+ getMacroByName: (state, getters) => (name: string) => {
+ const macros = getters.getMacros as Macro[]
+
+ return macros.find(macro => macro.name === name)
+ },
+
// Gets visible macros, transformed. Should include the macro's config.
// Is only used on the dashboard. Grouped by category.
getVisibleMacros: (state, getters) => {