Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Fix trigger node type identification on add to canvas #5043

Merged
merged 1 commit into from
Dec 28, 2022

Conversation

@@ -339,8 +339,7 @@ export const useNodeCreatorStore = defineStore(STORES.NODE_CREATOR, {
if (!nodeType) return [];

const { workflowTriggerNodes } = useWorkflowsStore();
const isTrigger =
nodeType.toLocaleLowerCase().includes('trigger') || nodeType === WEBHOOK_NODE_TYPE;
const isTrigger = useNodeTypesStore().isTriggerNode(nodeType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd save useNodeTypesStore() call result to a variable but for that you should refactor the creation of this store to use a callback function that returns the object (which is now passed directly as the second argument of defineStore)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, maybe switching to the setup store creation pattern is not what you want to do just right now :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Exactly

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Dec 28, 2022
@ivov ivov merged commit 2aba0c6 into master Dec 28, 2022
@ivov ivov deleted the fix-trigger-node-type-identification-on-add-to-canvas branch December 28, 2022 09:28
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Dec 28, 2022
@janober
Copy link
Member

janober commented Dec 29, 2022

Got released with n8n@0.209.4

@janober janober removed the Upcoming Release Will be part of the upcoming release label Dec 29, 2022
MiloradFilipovic added a commit that referenced this pull request Dec 29, 2022
* master:
  ci: Fix linting on builds (no-changelog) (#5062)
  refactor: Lint for no interpolation in regular string (#5060) (no-changelog)
  ci: Fix lint for build (no-changelog) (#5059)
  perf: Prevent oclif from loading ts-node and typescript (#5047) (no-changelog)
  fix(editor): Make node title non-editable in executions view (#5046)
  refactor: Lint for no unneeded backticks (#5057) (no-changelog)
  fix(core): Fix full manual execution for error trigger as starter of 2+ node workflow (#5055)
  fix(editor): Support tabbing away from inline expression editor (#5056)
  refactor(editor): Usage and plans page on Desktop (#5051)
  📚 Update CHANGELOG.md and main package.json to 0.209.4
  🔖 Release n8n@0.209.4
  ⬆️ Set n8n-editor-ui@0.175.4 on n8n
  🔖 Release n8n-editor-ui@0.175.4
  fix(editor): Usage and plans page on Desktop (#5045)
  feat(editor): Switch to expression on `=` input (#5044)
  fix(editor): Fix trigger node type identification on add to canvas (#5043)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants