diff options
Diffstat (limited to 'app/assets/javascripts/static_site_editor/index.js')
-rw-r--r-- | app/assets/javascripts/static_site_editor/index.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/assets/javascripts/static_site_editor/index.js b/app/assets/javascripts/static_site_editor/index.js index fceef8f9084..b58564388de 100644 --- a/app/assets/javascripts/static_site_editor/index.js +++ b/app/assets/javascripts/static_site_editor/index.js @@ -9,6 +9,7 @@ const initStaticSiteEditor = el => { isSupportedContent, path: sourcePath, baseUrl, + branch, namespace, project, mergeRequestsIllustrationPath, @@ -16,13 +17,9 @@ const initStaticSiteEditor = el => { // so we are adding them here as a convenience for future use. // eslint-disable-next-line no-unused-vars staticSiteGenerator, - // eslint-disable-next-line no-unused-vars imageUploadPath, mounts, } = el.dataset; - // NOTE that the object in 'mounts' is a JSON string from the data attribute, so it must be parsed into an object. - // eslint-disable-next-line no-unused-vars - const mountsObject = JSON.parse(mounts); const { current_username: username } = window.gon; const returnUrl = el.dataset.returnUrl || null; const router = createRouter(baseUrl); @@ -30,9 +27,13 @@ const initStaticSiteEditor = el => { isSupportedContent: parseBoolean(isSupportedContent), hasSubmittedChanges: false, project: `${namespace}/${project}`, + mounts: JSON.parse(mounts), // NOTE that the object in 'mounts' is a JSON string from the data attribute, so it must be parsed into an object. + branch, + baseUrl, returnUrl, sourcePath, username, + imageUploadPath, }); return new Vue({ |