mirror of
https://github.com/Egonex-AI/Understand-Anything.git
synced 2026-06-22 10:58:03 +08:00
fix: use localeCompare in languages sort for reliable alphabetical order
Default sort() uses Unicode code point ordering which can produce unexpected results for non-ASCII strings. localeCompare guarantees correct alphabetical ordering regardless of character set.
This commit is contained in:
@@ -406,7 +406,7 @@ export class GraphBuilder {
|
||||
version: "1.0.0",
|
||||
project: {
|
||||
name: this.projectName,
|
||||
languages: [...this.languages].sort(),
|
||||
languages: [...this.languages].sort((a, b) => a.localeCompare(b)),
|
||||
frameworks: [],
|
||||
description: "",
|
||||
analyzedAt: new Date().toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user