})
api.on.inspectComponent((payload, ctx) => {
- if (
- (
- payload.componentInstance?.proxy as
- | ComponentPublicInstance
- | undefined
- )?._pStores
- ) {
+ const proxy = (payload.componentInstance &&
+ payload.componentInstance.proxy) as
+ | ComponentPublicInstance
+ | undefined
+ if (proxy && proxy._pStores) {
const piniaStores = (
payload.componentInstance.proxy as ComponentPublicInstance
)._pStores!
value: store.$state,
})
- if (store._getters?.length) {
+ if (store._getters && store._getters.length) {
payload.instanceData.state.push({
type: '🍍 ' + store.$id,
key: 'getters',