Skip to content

Commit f515247

Browse files
authored
Merge pull request #153 from GursheenK/initial-load-for-templates
fix: run watcher immediately for setting theme dialog
2 parents 9367d99 + 32d9bae commit f515247

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/pages/PresentationEditor.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ const loadEditorState = async () => {
228228
const handleMounted = () => {
229229
// templates load from Home.vue
230230
// but if user lands directly on editor check and load them
231-
inReadonlyMode.value = props.editorAccess == 'view'
232231
loadTemplates()
233-
loadEditorState()
234232
}
235233
236234
const handleBeforeUnmount = () => {
@@ -266,6 +264,7 @@ watch(
266264
watch(
267265
() => props.presentationId,
268266
(id) => {
267+
inReadonlyMode.value = props.editorAccess == 'view'
269268
if (route.name === 'EditorNew') {
270269
resetEditorState()
271270
themeDialogAction.value = 'create'
@@ -274,6 +273,7 @@ watch(
274273
}
275274
loadEditorState()
276275
},
276+
{ immediate: true },
277277
)
278278
279279
onBeforeRouteLeave(() => {

0 commit comments

Comments
 (0)