From f399c9e95f572fa81236e4e7b5eedf207c4bedad Mon Sep 17 00:00:00 2001 From: Sergey Date: Tue, 16 Jun 2020 19:29:29 +0200 Subject: [PATCH] Sort enviroment variables in the dropdown on edit (#2295) --- .../app/ui/components/templating/variable-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/insomnia-app/app/ui/components/templating/variable-editor.js b/packages/insomnia-app/app/ui/components/templating/variable-editor.js index c9ac0abb25..0bcad2f0ff 100644 --- a/packages/insomnia-app/app/ui/components/templating/variable-editor.js +++ b/packages/insomnia-app/app/ui/components/templating/variable-editor.js @@ -66,7 +66,7 @@ class VariableEditor extends PureComponent { } const context = await this.props.handleGetRenderContext(); - const variables = context.keys; + const variables = context.keys.sort((a, b) => (a.name < b.name ? -1 : 1)); const variableSource = context.context.getKeysContext().keyContext[cleanedValue] || ''; // Hack to skip updating if we unmounted for some reason if (this._select) {