Skip to content

Commit

Permalink
👌 Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
MiloradFilipovic committed Nov 22, 2023
1 parent dc3976e commit 52b2a66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const usersStore = useUsersStore();
const workflowsStore = useWorkflowsStore();
const HEARTBEAT_INTERVAL = 5 * TIME.MINUTE;
const heartbeatTimer = ref(null as null | number);
const heartbeatTimer = ref<number | null>(null);
const activeUsersSorted = computed(() => {
const currentWorkflowUsers = (collaborationStore.getUsersForCurrentWorkflow ?? []).map(
Expand All @@ -21,7 +21,7 @@ const activeUsersSorted = computed(() => {
const owner = currentWorkflowUsers.find((user) => user.globalRoleId === 1);
return {
defaultGroup: owner
? [owner, ...currentWorkflowUsers.filter((user) => user.id !== owner?.id)]
? [owner, ...currentWorkflowUsers.filter((user) => user.id !== owner.id)]
: currentWorkflowUsers,
};
});
Expand Down
4 changes: 3 additions & 1 deletion packages/editor-ui/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,9 @@ export const UPDATE_WEBHOOK_ID_NODE_TYPES = [FORM_TRIGGER_NODE_TYPE];

export const CREATOR_HUB_URL = 'https://creators.n8n.io/hub';

// Units of time in milliseconds
/**
* Units of time in milliseconds
*/
export const TIME = {
SECOND: 1000,
MINUTE: 60 * 1000,
Expand Down

0 comments on commit 52b2a66

Please sign in to comment.