diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index c13c4f9a6..6fb22a340 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -7,7 +7,9 @@ import { isDialogOpened } from 'src/filters'; const arrayDataStore = useArrayDataStore(); -export function useArrayData(key = useRoute().meta.moduleName, userOptions) { +export function useArrayData(key, userOptions) { + key ??= useRoute().meta.moduleName; + if (!key) throw new Error('ArrayData: A key is required to use this composable'); if (!arrayDataStore.get(key)) arrayDataStore.set(key);