unstorage
unstorage copied to clipboard
`getItems` does not work with `prefixStorage`
Environment
1.10.1
Reproduction
https://stackblitz.com/edit/stackblitz-starters-rrstqp?file=index.js
Describe the bug
Working
useStorage().getItems(['namespace:key'])
Not Working
prefixStorage(useStorage(), 'namespace').getItems(['key'])
useStorage('namespace').getItems(['key'])
// { key: "key", value: null }
It seems to switch back to the default driver (memory
). I'm guessing this is because the mount is being discovered from the input key, without the base being applied first.
Additional context
No response
Logs
No response
Can you please make a sandbox ideally with unstorage only? 🙏🏼
Yes, sorry thought it was clear enough. Here is a repro: https://stackblitz.com/edit/stackblitz-starters-rrstqp?file=index.js
Would be great to add a starter to readme for quickly spinning one up.
useStorage('namespace').clear() also not working with namespace