修复更新任务、环境变量、依赖、订阅状态丢失

This commit is contained in:
whyour
2023-04-21 21:15:01 +08:00
parent db564d1add
commit b705ad6ee8
4 changed files with 11 additions and 5 deletions
+4 -1
View File
@@ -12,7 +12,10 @@ export class Dependence {
constructor(options: Dependence) {
this.id = options.id;
this.status = options.status || DependenceStatus.installing;
this.status =
typeof options.status === 'number' && DependenceStatus[options.status]
? options.status
: DependenceStatus.installing;
this.type = options.type || DependenceTypes.nodejs;
this.timestamp = new Date().toString();
this.name = options.name;