Replace toLocaleLowerCase with toLowerCase for ASCII comparisons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 17:51:46 +08:00
parent 7e09b21f2e
commit 8747421901

View File

@@ -80,7 +80,7 @@ export const useMapPathStore = defineStore('mapPathStore', {
this.insights = { ...insights };
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
.filter(function (elem) {
return elem.data('label').toLocaleLowerCase() === 'start';
return elem.data('label').toLowerCase() === 'start';
});
for (let i = 0; i < INSIGHTS_FIELDS_AND_LABELS.length; i++) {
const curButton = this.insights[INSIGHTS_FIELDS_AND_LABELS[i][0]];
@@ -112,7 +112,7 @@ export const useMapPathStore = defineStore('mapPathStore', {
// Special case: append the last edge segment outside the loop
if (nodeIndex === curButton[listIndex].length - 1) {
const endNode = curGraphNode.outgoers('node').filter(neighbor =>
neighbor.data('label').toLocaleLowerCase() === 'end'
neighbor.data('label').toLowerCase() === 'end'
);
const lastEdge = curGraphNode.edgesWith(endNode);
this.insightWithPath[INSIGHTS_FIELDS_AND_LABELS[i][0]][listIndex].edges.push(lastEdge);
@@ -125,7 +125,7 @@ export const useMapPathStore = defineStore('mapPathStore', {
async createPaths() {
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
.filter(function (elem) {
return elem.data('label').toLocaleLowerCase() === 'start';
return elem.data('label').toLowerCase() === 'start';
});
// Depth First Search from the starting node
await this.depthFirstSearchCreatePath(this.startNode, [this.startNode], []);