From a842c412eeac4233c71c83eb0b7999c63f14ab6c Mon Sep 17 00:00:00 2001 From: Geoffrey Kwan Date: Sat, 15 Apr 2023 16:43:19 -0400 Subject: [PATCH] fix(VLE): Step auto save message appears when it shouldn't sometimes (#1181) --- src/assets/wise5/vle/node/node.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/assets/wise5/vle/node/node.component.ts b/src/assets/wise5/vle/node/node.component.ts index e692e80a51b..892056b635f 100644 --- a/src/assets/wise5/vle/node/node.component.ts +++ b/src/assets/wise5/vle/node/node.component.ts @@ -308,7 +308,10 @@ export class NodeComponent implements OnInit { } const studentWorkList = savedStudentDataResponse.studentWorkList; if (!componentId && studentWorkList && studentWorkList.length) { - this.latestComponentState = studentWorkList[studentWorkList.length - 1]; + const latestComponentState = studentWorkList[studentWorkList.length - 1]; + if (latestComponentState.nodeId === this.node.id) { + this.latestComponentState = latestComponentState; + } } else { this.clearLatestComponentState(); }