File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/hoppscotch-common/src/components/collections Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const toast = useToast()
157157const props = withDefaults (
158158 defineProps <{
159159 show: boolean
160- loadingState: boolean
160+ loadingState? : boolean
161161 editingProperties: EditingProperties
162162 source: " REST" | " GraphQL"
163163 modelValue: string
Original file line number Diff line number Diff line change @@ -2796,8 +2796,13 @@ const setCollectionProperties = (newCollection: {
27962796 path: string
27972797}) => {
27982798 const { collection, path, isRootCollection } = newCollection
2799+
27992800 if (! collection ) return
28002801
2802+ // We default to using collection.id but during the callback to our application, collection.id is not being preserved.
2803+ // Since path is being preserved, we extract the collectionId from path instead
2804+ const collectionId = collection .id ?? path .split (" /" ).pop ()
2805+
28012806 if (collectionsType .value .type === " my-collections" ) {
28022807 if (isRootCollection ) {
28032808 editRESTCollection (parseInt (path ), collection )
@@ -2818,13 +2823,13 @@ const setCollectionProperties = (newCollection: {
28182823 )
28192824 })
28202825 toast .success (t (" collection.properties_updated" ))
2821- } else if (hasTeamWriteAccess .value && collection . id ) {
2826+ } else if (hasTeamWriteAccess .value && collectionId ) {
28222827 const data = {
28232828 auth: collection .auth ,
28242829 headers: collection .headers ,
28252830 }
28262831 pipe (
2827- updateTeamCollection (collection . id , JSON .stringify (data ), undefined ),
2832+ updateTeamCollection (collectionId , JSON .stringify (data ), undefined ),
28282833 TE .match (
28292834 (err : GQLError <string >) => {
28302835 toast .error (` ${getErrorMessage (err )} ` )
You can’t perform that action at this time.
0 commit comments