MaiXinRong 5 years ago
parent
commit
5281e9843c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/service/stage.js

+ 1 - 1
app/service/stage.js

@@ -159,7 +159,7 @@ module.exports = app => {
             this.sqlBuilder.orderBy = [['order', 'desc']];
             const [sql, sqlParam] = this.sqlBuilder.build(this.tableName);
             const stage = await this.db.queryOne(sql, sqlParam);
-            stage.tp_history = stage.tp_history ? JSON.parse(stage.tp_history) : [];
+            if (stage) stage.tp_history = stage.tp_history ? JSON.parse(stage.tp_history) : [];
             return stage;
         }