10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b666247 commit b8623f1< 10000 /button>Copy full SHA for b8623f1
src/main.test.ts
@@ -781,6 +781,7 @@ describe('set', () => {
781
siteID,
782
})
783
784
+ expect(async () => await blobs.set('', 'value')).rejects.toThrowError('Blob key must not be empty.')
785
expect(async () => await blobs.set('/key', 'value')).rejects.toThrowError(
786
'Blob key must not start with forward slash (/).',
787
)
src/store.ts
@@ -307,6 +307,10 @@ export class Store {
307
}
308
309
private static validateKey(key: string) {
310
+ if (key === '') {
311
+ throw new Error('Blob key must not be empty.')
312
+ }
313
+
314
if (key.startsWith('/') || key.startsWith('%2F')) {
315
throw new Error('Blob key must not start with forward slash (/).')
316
0 commit comments