mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Fix timestamp not set on clearing instance saves
Set the save's updatedAtMs timestamp when clearing the save list of a reassigned or deleted instance. This fixes the Web UI not updating the saves list to remove the saves when an instance is reassigned.
This commit is contained in:
1 parent
48c31b4825
commit
40f5a6ab7c
1 file changed
+2
@@ -876,9 +876,11 @@ export default class Controller {
|
|||||||
*/
|
*/
|
||||||
clearSavesOfInstance(instanceId: number) {
|
clearSavesOfInstance(instanceId: number) {
|
||||||
const updates = [];
|
const updates = [];
|
||||||
|
const now = Date.now();
|
||||||
for (const [id, save] of this.saves) {
|
for (const [id, save] of this.saves) {
|
||||||
if (save.instanceId === instanceId) {
|
if (save.instanceId === instanceId) {
|
||||||
save.isDeleted = true;
|
save.isDeleted = true;
|
||||||
|
save.updatedAtMs = now;
|
||||||
updates.push(save);
|
updates.push(save);
|
||||||
this.saves.delete(id);
|
this.saves.delete(id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user