Skip to content

Commit e840d7e

Browse files
committed
fix: ignore undefined key
Signed-off-by: Pedro Lamas <[email protected]>
1 parent 220655d commit e840d7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/httpClientActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const httpClientActions = {
7171
serverDatabaseItemGet<T = unknown> (namespace: string, key?: string, options?: AxiosRequestConfig) {
7272
return this.get<{
7373
result: Moonraker.Database.GetItemResponse<T>
74-
}>(`/server/database/item?namespace=${namespace}&key=${key}`, options)
74+
}>(`/server/database/item?namespace=${namespace}${key != null ? `&key=${key}` : ''}`, options)
7575
},
7676

7777
serverDatabaseItemPost<T = unknown> (namespace: string, key: string, value: T, options?: AxiosRequestConfig) {

0 commit comments

Comments
 (0)