Skip to content

Commit 45c7586

Browse files
committed
Fix preview to not override page
Previously, sharedPageModel would override the specific page model. This changes the order so that the specific page model is prioritized to override the shared model.
1 parent f104861 commit 45c7586

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gulp.d/tasks/build-preview-pages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports =
5050
const siteRootPath = path.relative(ospath.dirname(file.path), ospath.resolve(previewSrc))
5151
const uiModel = { ...baseUiModel }
5252
const sharedPageModel = page.component ? baseUiModel.shared[page.component.name][page.version] : {}
53-
uiModel.page = { ...uiModel.page, ...page, ...sharedPageModel }
53+
uiModel.page = { ...uiModel.page, ...sharedPageModel, ...page }
5454
uiModel.siteRootPath = siteRootPath
5555
uiModel.siteRootUrl = path.join(siteRootPath, 'index.html')
5656
uiModel.uiRootPath = path.join(siteRootPath, '_')

0 commit comments

Comments
 (0)