Skip to content

Commit 94488ce

Browse files
committed
chore: emit toast in correct case
1 parent 829c984 commit 94488ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/app/src/use/storage/local.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const useLocalStorage = () => {
5252
return project ? storage.support(project) : undefined
5353
}
5454

55-
const onSaveProject = async (event: boolean = true) => {
55+
const onSaveProject = async (event: boolean = true, notify: boolean = true) => {
5656
if (PROJECT.name === env.projectEmpty()) return
5757

5858
const editor = document.querySelector('#edit')
@@ -69,7 +69,7 @@ export const useLocalStorage = () => {
6969

7070
setProject(storage.getProjectObject())
7171

72-
toast.success(t('toast.project.save'))
72+
if(notify) toast.success(t('toast.project.save'))
7373
})
7474
.finally(() => {
7575
plugin.emit('plugin-progress-end')

0 commit comments

Comments
 (0)