Skip to content

Conversation

@hustcc
Copy link
Member

@hustcc hustcc commented Sep 7, 2023


if (nodes) {
nodes.forEach((node, i) => {
nodeMap[node.id] = i;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

现在的 id 可能是 string 或 number。比如 0 和 '0' 可能同时存在,nodeMap 的 key 会全部变成 string,最好用 Map 替代

@Yanyan-Wang Yanyan-Wang merged commit 20a07e4 into next Sep 7, 2023
@Yanyan-Wang Yanyan-Wang deleted the feat-floyd-warshall branch September 7, 2023 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants