From 0c561f2d637499f0c2f37df7882ec9205a1cd7d0 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sat, 15 Mar 2025 14:20:44 +0530 Subject: [PATCH] fix: call getMeta only when needed --- frontend/src/utils/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/utils/index.js b/frontend/src/utils/index.js index 338c4ad8..289e9120 100644 --- a/frontend/src/utils/index.js +++ b/frontend/src/utils/index.js @@ -75,11 +75,9 @@ export function timeAgo(date) { return useTimeAgo(date).value } -const taskMeta = getMeta('CRM Task') - export function taskStatusOptions(action, data) { let options = ['Backlog', 'Todo', 'In Progress', 'Done', 'Canceled'] - let statusMeta = taskMeta + let statusMeta = getMeta('CRM Task') .getFields() ?.find((field) => field.fieldname == 'status') if (statusMeta) { @@ -98,7 +96,7 @@ export function taskStatusOptions(action, data) { export function taskPriorityOptions(action, data) { let options = ['Low', 'Medium', 'High'] - let priorityMeta = taskMeta + let priorityMeta = getMeta('CRM Task') .getFields() ?.find((field) => field.fieldname == 'priority') if (priorityMeta) {