Skip to content

Commit d928d3d

Browse files
davisionfago
andauthored
Add support for page_layout property of lupus_ce_renderer module. Fix page commit to correctly update the store. (#55)
* LDP-1071 - Add support for page_layout * LDP-1071 - Fix page commit and move store registration higher * LDP-1071 - Revert dependencies Co-authored-by: Wolfgang Ziegler // fago <[email protected]>
1 parent c773bdf commit d928d3d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/plugin.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ const storeModule = {
7171
content,
7272
breadcrumbs: Array.isArray(breadcrumbs) ? breadcrumbs : [],
7373
metatags,
74+
// eslint-disable-next-line camelcase
7475
localTasks: local_tasks,
76+
// eslint-disable-next-line camelcase
7577
page_layout,
7678
settings
7779
}
@@ -88,7 +90,7 @@ const storeModule = {
8890
linkObject.hid = `${firstKey}:${linkObject[firstKey]}`
8991
return linkObject
9092
})
91-
state.page = page
93+
state.page = { ...page }
9294
},
9395
messages (state, messages) {
9496
// Make messages be flat array with message type.
@@ -197,6 +199,8 @@ const storeModule = {
197199
}
198200

199201
export default function (context, inject) {
202+
context.store.registerModule('drupalCe', storeModule)
203+
200204
const { $config, $axios } = context
201205
const options = JSON.parse('<%= JSON.stringify(options) %>')
202206

@@ -210,8 +214,6 @@ export default function (context, inject) {
210214
return
211215
}
212216

213-
context.store.registerModule('drupalCe', storeModule)
214-
215217
// Create a custom axios instance, optionally having custom options.
216218
const $axiosDrupal = $axios.create(options.axios)
217219
options.baseURL = process.browser && options.axios.browserBaseURL ? options.axios.browserBaseURL : options.baseURL

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11878,4 +11878,4 @@ yargs@^15.1.0, yargs@^15.3.1, yargs@^15.4.1:
1187811878
yocto-queue@^0.1.0:
1187911879
version "0.1.0"
1188011880
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
11881-
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
11881+
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

0 commit comments

Comments
 (0)