mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-28 07:04:10 +00:00
fix: fetching reflection adds draft state in gRPC (#6218)
This commit is contained in:
@@ -129,11 +129,15 @@ const GrpcQueryUrl = ({ item, collection, handleRun }) => {
|
||||
setProtoFilePath('');
|
||||
setIsReflectionMode(true);
|
||||
|
||||
dispatch(updateRequestProtoPath({
|
||||
protoPath: '',
|
||||
itemUid: item.uid,
|
||||
collectionUid: collection.uid
|
||||
}));
|
||||
// Only update protoPath if it was previously set (to avoid creating unnecessary draft state)
|
||||
const currentProtoPath = getPropertyFromDraftOrRequest(item, 'request.protoPath', '');
|
||||
if (currentProtoPath) {
|
||||
dispatch(updateRequestProtoPath({
|
||||
protoPath: '',
|
||||
itemUid: item.uid,
|
||||
collectionUid: collection.uid
|
||||
}));
|
||||
}
|
||||
|
||||
if (methods && methods.length > 0) {
|
||||
toast.success(`Loaded ${methods.length} gRPC methods from reflection`);
|
||||
|
||||
Reference in New Issue
Block a user