|
@@ -147,8 +147,10 @@ export default {
|
|
|
}
|
|
|
if (!res) return;
|
|
|
if (this.$checkRes(res)) {
|
|
|
- const d = res.data.filter(f => f.termid === termid);
|
|
|
- this.$set(this, `classList`, d);
|
|
|
+ if (_.isArray(res.data) && res.data.length > 0) {
|
|
|
+ const d = res.data.filter(f => f.termid === termid);
|
|
|
+ this.$set(this, `classList`, d);
|
|
|
+ }
|
|
|
}
|
|
|
// 检查是否是初始化,如果是初始化(由上级来),需要检查classid是不是在这里,不在就清除掉
|
|
|
const r = this.classList.find(f => f._id === classid);
|