diff options
Diffstat (limited to 'apps/files/src/store/index.ts')
-rw-r--r-- | apps/files/src/store/index.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files/src/store/index.ts b/apps/files/src/store/index.ts new file mode 100644 index 00000000000..3ba667ffd2f --- /dev/null +++ b/apps/files/src/store/index.ts @@ -0,0 +1,15 @@ +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +import { createPinia } from 'pinia' + +export const getPinia = () => { + if (window._nc_files_pinia) { + return window._nc_files_pinia + } + + window._nc_files_pinia = createPinia() + return window._nc_files_pinia +} |