diff --git a/src/store/actions.js b/src/store/actions.js index f84b627..08589e6 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -2,6 +2,7 @@ import Password from "../api/password"; import User from "../api/user"; import * as urlParser from "../services/url-parser"; import * as types from "./mutation-types"; +import defaultPasswordProfile from "./defaultPassword"; export const refreshToken = ({ commit, state }) => { const token = state.token; @@ -22,7 +23,8 @@ export const loadPasswordProfile = ({ commit }, { site }) => { export const getPasswordFromUrlQuery = ({ commit }, { query }) => { const password = urlParser.getPasswordFromUrlQuery(query); - if (Object.keys(password).length === 9) { + const expectedNbOfElements = Object.keys(defaultPasswordProfile).length; + if (Object.keys(password).length === expectedNbOfElements) { commit(types.SET_PASSWORD, { password }); } };