Skip to content

Commit 5a6f94b

Browse files
author
Xziy
committed
fix backup handler destory loop
1 parent e7f9be2 commit 5a6f94b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libs/BackupHandler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class BackupHandler {
106106
options.concepts.push("origin");
107107
if (options.concepts.length && options.turncate) {
108108
console.log(`Truncating concepts: ${options.concepts.join(', ')}`);
109-
for (let concept in options.concepts) {
109+
for (let concept of options.concepts) {
110110
await Dish.destroy({ concept: concept }).fetch();
111111
await Group.destroy({ concept: concept }).fetch();
112112
console.log(`Destroyed concept: ${concept}`);

libs/BackupHandler.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class BackupHandler {
113113
if (!options.concepts.length) options.concepts.push("origin");
114114
if (options.concepts.length && options.turncate) {
115115
console.log(`Truncating concepts: ${options.concepts.join(', ')}`);
116-
for (let concept in options.concepts) {
116+
for (let concept of options.concepts) {
117117
await Dish.destroy({ concept: concept }).fetch();
118118
await Group.destroy({ concept: concept }).fetch();
119119
console.log(`Destroyed concept: ${concept}`);

0 commit comments

Comments
 (0)