question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi, Following code does not work:

@Action
  changeCurrentDistrict(district: number) {
    if (!this.doesDistrictExist(district)) {
      return false;
    }

    this.setCurrentDistrict(district);

    return true;
  }

  @Action
  previousDistrict() {
    return this.changeCurrentDistrict(this.currentDistrict - 1);
  }

  @Action
  nextDistrict() {
    return this.changeCurrentDistrict(this.currentDistrict + 1);
  }

Error:

Unhandled promise rejection Error: "ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access this.someMutation() or this.someGetter inside an @Action? 
That works only in dynamic modules. 
If not dynamic use this.context.commit("mutationName", payload) and this.context.getters["getterName"]

How can I fix that? Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Bartozzzcommented, Oct 21, 2018

This still needs to be addressed. I have the same issue.

0reactions
sszczepcommented, Oct 21, 2018

Hi, Thank you for your answer. Please take a look at my first code. I had done it like you showed it and still - the error occurs. What’s wrong then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested actions - IBM
A nested action is any action started when an action is already in progress. Nested actions can be started only when a hook...
Read more >
Nested composite actions · Issue #862 · actions/runner - GitHub
I would like to be able to create a composite action that contains other composite actions. This does not seem to currently work....
Read more >
Nesting Actions in QTP - All About Automation Testing
By nesting actions, you can: Maintain the modularity of your test. Run one or more actions based on the results of a conditional...
Read more >
Error Handling Nested Actions in Power Automate
Hello, I was looking at a way to get the error message from nested actions inside a Scope container. I have the example...
Read more >
GitHub Composite Actions - STOP wasting your time and ...
A composite run steps action allows you to combine multiple workflow run steps within one action. For example, you can use this feature...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found