mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-31 06:23:08 +02:00
Make prompt() to return null on cancel
This commit is contained in:
@@ -33,6 +33,9 @@ export function useRenameRequest(requestId: string | null) {
|
||||
defaultValue: request.name,
|
||||
confirmText: 'Save',
|
||||
});
|
||||
|
||||
if (name == null) return;
|
||||
|
||||
if (request.model === 'http_request') {
|
||||
updateHttpRequest.mutate({ id: request.id, update: (r: HttpRequest) => ({ ...r, name }) });
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user