Skip to content

Commit 4139492

Browse files
committed
hotfix for column passing
1 parent a403889 commit 4139492

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

classes/Layer/Layer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ export default class Layer {
9898
return {
9999
id: this.id,
100100
label: this.label,
101-
pages: this.pages.map(p => new Page(this.id, p).asProjectPage())
101+
pages: this.pages.map(p => {
102+
const page = new Page(this.id, p).asProjectPage()
103+
if (p.columns) page.columns = p.columns
104+
return page
105+
})
102106
}
103107
}
104108

utilities/shared.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ export const updatePageAndProject = async (page, project, userId) => {
146146
id: rerumPageId,
147147
label: page.label,
148148
target: page.target,
149-
items: page.items ?? []
149+
items: page.items ?? [],
150+
columns: layer.pages[pageIndex].columns
150151
}
151152

152153
// Update layer's pages array BEFORE creating Layer
@@ -171,6 +172,7 @@ export const updatePageAndProject = async (page, project, userId) => {
171172
// Page won't be saved to RERUM (no content, not already in RERUM)
172173
// Just update local page reference in layer without touching RERUM
173174
const updatedPage = await page.update()
175+
updatedPage.columns = layer.pages[pageIndex].columns
174176
layer.pages[pageIndex] = updatedPage
175177
}
176178

0 commit comments

Comments
 (0)