Skip to content
Snippets Groups Projects
Commit 204ae57f authored by chris's avatar chris
Browse files

fix config

parent 1bfcaae8
No related branches found
No related tags found
No related merge requests found
......@@ -34,9 +34,10 @@ const TitleButton = ({ view = {}, item }) => {
useEffect(() => {
if (titleNode[0]) {
serviceConfig.updateTitle(titleNode[0].node.textContent);
if (serviceConfig)
serviceConfig.updateTitle(titleNode[0].node.textContent);
} else {
serviceConfig.updateTitle('');
if (serviceConfig) serviceConfig.updateTitle('');
}
}, [chapterTitle]);
......
......@@ -81,7 +81,9 @@ const dropDownOptions = [
const EditingSuggesting = ({ view: { dispatch, state }, item }) => {
const { app, activeView, pmViews } = useContext(WaxContext);
const enableService = app.config.get('config.EnableTrackChangeService');
const enableService = app.config.get('config.EnableTrackChangeService')
? app.config.get('config.EnableTrackChangeService')
: { toggle: false };
const isDisabled = enableService.toggle;
const isEditable = pmViews.main.props.editable(editable => {
......
......@@ -62,8 +62,6 @@ const Wax = forwardRef((props, ref) => {
helpers.revertNotesSchema(schema);
};
const TrackChange = application.config.get('config.EnableTrackChangeService');
const Layout = application.container.get('Layout');
if (layout) Layout.setLayout(layout);
const WaxRender = Layout.layoutComponent;
......@@ -82,7 +80,10 @@ const Wax = forwardRef((props, ref) => {
ref={ref}
serializer={serializer}
targetFormat={targetFormat}
TrackChange={TrackChange}
TrackChange={
application.config.get('config.EnableTrackChangeService') ||
undefined
}
user={user}
value={value}
>
......
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