Sort languages alphabetically on DeepL Node

This commit is contained in:
Jan Oberhauser 2021-05-30 12:36:04 -05:00
parent 07a9108e46
commit 731ae84eee

View file

@ -89,6 +89,13 @@ export class DeepL implements INodeType {
value: language.language,
});
}
returnData.sort((a, b) => {
if (a.name < b.name) { return -1; }
if (a.name > b.name) { return 1; }
return 0;
});
return returnData;
},
},