Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
refactor: better name for duplicated environment
liyasthomasd83269054897
diff --git a/packages/hoppscotch-app/newstore/environments.ts b/packages/hoppscotch-app/newstore/environments.tsindex 8017a7225..02f12f30d 100644--- a/packages/hoppscotch-app/newstore/environments.ts+++ b/packages/hoppscotch-app/newstore/environments.ts@@ -87,12 +87,14 @@ const dispatchers = defineDispatchers({environments,}}+ const index =+ environments.filter((env) => env.name === newEnvironment.name).length + 1return {environments: [...environments,{...cloneDeep(newEnvironment),- name: `Duplicate of ${newEnvironment.name}`,+ name: `${newEnvironment.name} ${index}`,},],}