druxt-menu 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -223,6 +223,7 @@ export default {
|
|
|
223
223
|
mounted() {
|
|
224
224
|
// If logged in and statically generated, re-fetch the menu.
|
|
225
225
|
if (this?.$auth?.loggedIn && this?.$store?.app?.context?.isStatic) {
|
|
226
|
+
this.$store.commit('druxtMenu/flushEntities', { prefix: this.lang })
|
|
226
227
|
const settings = this.$options.druxt.settings(this, this.component.settings)
|
|
227
228
|
this.$options.druxt.fetchData.call(this, settings)
|
|
228
229
|
}
|
package/dist/druxt-menu.esm.js
CHANGED
|
@@ -167,6 +167,12 @@ const DruxtMenuStore = ({ store }) => {
|
|
|
167
167
|
const entity = entities[index];
|
|
168
168
|
Vue.set(state.entities[prefix], entity.id, entity);
|
|
169
169
|
}
|
|
170
|
+
},
|
|
171
|
+
flushEntities(state, { prefix }) {
|
|
172
|
+
if (!prefix || typeof state.entities !== "object")
|
|
173
|
+
Vue.set(state, "entities", {});
|
|
174
|
+
if (prefix)
|
|
175
|
+
Vue.set(state.entities, prefix, {});
|
|
170
176
|
}
|
|
171
177
|
},
|
|
172
178
|
actions: {
|
package/dist/druxt-menu.ssr.js
CHANGED
|
@@ -175,6 +175,12 @@ const DruxtMenuStore = ({ store }) => {
|
|
|
175
175
|
const entity = entities[index];
|
|
176
176
|
Vue__default["default"].set(state.entities[prefix], entity.id, entity);
|
|
177
177
|
}
|
|
178
|
+
},
|
|
179
|
+
flushEntities(state, { prefix }) {
|
|
180
|
+
if (!prefix || typeof state.entities !== "object")
|
|
181
|
+
Vue__default["default"].set(state, "entities", {});
|
|
182
|
+
if (prefix)
|
|
183
|
+
Vue__default["default"].set(state.entities, prefix, {});
|
|
178
184
|
}
|
|
179
185
|
},
|
|
180
186
|
actions: {
|