Skip to content

Duplicate field names #128

@danielhughesMSM

Description

@danielhughesMSM

Hi,

I've been using vuex-map-fields for over a year now and i've never had problems with it before. I've just come across an issue that i'm not sure how to solve.

I'm trying to set up some mappings and i'm running in to an error when i try to map the same name from multiple parts of my module.

For example. If i had:

leftHand: {
indexFinger
},
rightHand: {
indexFinger
}

i would have expected to be able to use v-model="leftHand.indexFinger" and v-model="rightHand.indexFinger" and then this in my computed properties.

...myFieldsMapper([
'rightHand.indexFinger',
'rightHand.indexFinger'
])

unfortunately what i get is:

Error: The key indexFinger is already in use.

Is it actually possible to do what i want or will i have to rename my fields to leftHand.leftHandIndexFinger etc. in order to get it to work?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions