Skip to content

collision between object path and serialization #138

@Heziode

Description

@Heziode

const payload = action.objPath
? new Payload(path, action.objPath, value)
: value

The above code create non Payload object for "root path", like the following example:

// global.js Vuex module
import { make } from "vuex-pathify";

export const state = () => ({
  something: true,
});

export const mutations = {
  ...make.mutations(state),
};

export const getters = {
  ...make.getters(state),
};

If I call $store.set("global/something", false), the Payload will be a simple object (like serialized object) and not a Payload instance.

Is there anything in particular to avoid using a Payload for the root path?


nb @davestewart : you did not push tags not the repo, and you did not release 1.5.1 on NPM.
I know that you are very busy, so, stay in shape 💪

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