Replace toLocaleLowerCase with toLowerCase for ASCII comparisons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,7 @@ export const useMapPathStore = defineStore('mapPathStore', {
|
|||||||
this.insights = { ...insights };
|
this.insights = { ...insights };
|
||||||
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
|
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
|
||||||
.filter(function (elem) {
|
.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++) {
|
for (let i = 0; i < INSIGHTS_FIELDS_AND_LABELS.length; i++) {
|
||||||
const curButton = this.insights[INSIGHTS_FIELDS_AND_LABELS[i][0]];
|
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
|
// Special case: append the last edge segment outside the loop
|
||||||
if (nodeIndex === curButton[listIndex].length - 1) {
|
if (nodeIndex === curButton[listIndex].length - 1) {
|
||||||
const endNode = curGraphNode.outgoers('node').filter(neighbor =>
|
const endNode = curGraphNode.outgoers('node').filter(neighbor =>
|
||||||
neighbor.data('label').toLocaleLowerCase() === 'end'
|
neighbor.data('label').toLowerCase() === 'end'
|
||||||
);
|
);
|
||||||
const lastEdge = curGraphNode.edgesWith(endNode);
|
const lastEdge = curGraphNode.edgesWith(endNode);
|
||||||
this.insightWithPath[INSIGHTS_FIELDS_AND_LABELS[i][0]][listIndex].edges.push(lastEdge);
|
this.insightWithPath[INSIGHTS_FIELDS_AND_LABELS[i][0]][listIndex].edges.push(lastEdge);
|
||||||
@@ -125,7 +125,7 @@ export const useMapPathStore = defineStore('mapPathStore', {
|
|||||||
async createPaths() {
|
async createPaths() {
|
||||||
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
|
this.startNode = this.cytoscape[this.processOrBPMN][this.curveType][this.directionType]?.nodes()
|
||||||
.filter(function (elem) {
|
.filter(function (elem) {
|
||||||
return elem.data('label').toLocaleLowerCase() === 'start';
|
return elem.data('label').toLowerCase() === 'start';
|
||||||
});
|
});
|
||||||
// Depth First Search from the starting node
|
// Depth First Search from the starting node
|
||||||
await this.depthFirstSearchCreatePath(this.startNode, [this.startNode], []);
|
await this.depthFirstSearchCreatePath(this.startNode, [this.startNode], []);
|
||||||
|
|||||||
Reference in New Issue
Block a user