Commit c8ed7ba6 authored by derek-knox's avatar derek-knox

Refactor to use parseBoolean

parent c759589e
import Vue from 'vue'; import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import StaticSiteEditor from './components/static_site_editor.vue'; import StaticSiteEditor from './components/static_site_editor.vue';
import createStore from './store'; import createStore from './store';
const initStaticSiteEditor = el => { const initStaticSiteEditor = el => {
const { projectId, path: sourcePath, returnUrl } = el.dataset; const { isSupportedContent, projectId, path: sourcePath, returnUrl } = el.dataset;
const isSupportedContent = 'isSupportedContent' in el.dataset;
const store = createStore({ const store = createStore({
initialState: { initialState: {
isSupportedContent, isSupportedContent: parseBoolean(isSupportedContent),
projectId, projectId,
returnUrl, returnUrl,
sourcePath, sourcePath,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment