Skip to content

Commit

Permalink
链接 添加值确保点存在
Browse files Browse the repository at this point in the history
  • Loading branch information
xushengfeng committed Jan 24, 2023
1 parent 9d0e150 commit 45ae1f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4583,10 +4583,10 @@ function link(key0: string) {
value: (key1: string, dv: number) => {
if (key1) {
// 尝试正向、反向寻找边的值,否则新建
if (.链接[key0][key1]?.value !== undefined) {
if (.链接[key0]?.[key1]?.value !== undefined) {
.链接[key0][key1].value = clip(.链接[key0][key1].value + dv, 0, 1);
.链接[key0][key1].time = t;
} else if (.链接[key1][key0]?.value !== undefined) {
} else if (.链接[key1]?.[key0]?.value !== undefined) {
.链接[key1][key0].value = clip(.链接[key1][key0].value + dv, 0, 1);
.链接[key1][key0].time = t;
} else {
Expand Down

0 comments on commit 45ae1f8

Please sign in to comment.