Skip to content

Better error message for Vuex mapActions typo #1327

Closed
@elithecho

Description

@elithecho

What problem does this feature solve?

While working using Vuex, I came across an error which took me quite a chunk of time to debug and I thought this deserves a better error messages.

While using map actions ...mapActions('select'Filter) - notice the mistake with no square brackets in Listings -> Filters -> SelectFilter component. The error went up to top level component and appears as below.

vue.runtime.esm.js:587 [Vue warn]: Failed to resolve async component: function Listings() {
      return __webpack_require__.e/* import() */(0).then(__webpack_require__.bind(null, /*! @/pages/Listings/index.vue */ "./app/javascript/pages/Listings/index.vue"));
    }
Reason: TypeError: Cannot convert undefined or null to object

What does the proposed API look like?

Show shows error message pointing to correct file and line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions