currently getting undefined is not an object (evaluating 'pinia._s.has'),TypeError, useStore only on IOS and MAC devices
function useStore(pinia, hot) {
const hasContext = hasInjectionContext();
pinia = // in test mode, ignore the argument provided as we can always retrieve a
// pinia instance with getActivePinia()
pinia || (hasContext ? inject(piniaSymbol, null) : null);
if (pinia)
setActivePinia(pinia);
pinia = activePinia;
if (!pinia._s.has(id)) {
if (isSetupStore) {
createSetupStore(id, setup, options, pinia);
} else {
createOptionsStore(id, options, pinia);
}
}
Expected behavior
should not throw error
Actual behavior
currently throwing error undefined is not an object (evaluating 'pinia._s.has'),TypeError, useStore
Reproduction
production
Steps to reproduce the bug
Vue 3.3.6 Pinia 2.1.7
main.ts file import { createPinia } from "pinia"; const pinia = createPinia(); app.use(createPinia());
detail.vue import { DetailPageStore } from "@/stores/page-detail"; const detailPageStore = DetailPageStore(); detailPageStore.showPage('DetailPage');
detailPageStore.ts import { defineStore } from "pinia";
export const detailPageStore = defineStore({ id: "detail-page", state: (): DetailPageState => ({ pageName: null, }), actions: {
} });
currently getting undefined is not an object (evaluating 'pinia._s.has'),TypeError, useStore only on IOS and MAC devices function useStore(pinia, hot) { const hasContext = hasInjectionContext(); pinia = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() pinia || (hasContext ? inject(piniaSymbol, null) : null); if (pinia) setActivePinia(pinia); pinia = activePinia; if (!pinia._s.has(id)) { if (isSetupStore) { createSetupStore(id, setup, options, pinia); } else { createOptionsStore(id, options, pinia); } }
Expected behavior
should not throw error
Actual behavior
currently throwing error undefined is not an object (evaluating 'pinia._s.has'),TypeError, useStore
Additional information
No response