|
@@ -371,6 +371,7 @@ const gatherChapter = {
|
|
|
return [gclChapter, otherChapter, customChapter];
|
|
|
},
|
|
|
_getGclChapter: function (chapter, data, field) {
|
|
|
+ console.log(chapter, data, field);
|
|
|
for (const c of chapter) {
|
|
|
if (c.filter) {
|
|
|
const reg = new RegExp(c.filter);
|
|
@@ -394,6 +395,7 @@ const gatherChapter = {
|
|
|
const gatherRelaFields = function (chapter, source, field) {
|
|
|
const fields = field instanceof Array ? field : [field];
|
|
|
for (const f of fields) {
|
|
|
+ console.log(chapter, source);
|
|
|
chapter[f.target] = ctx.helper.add(chapter[f.target], source[f.target]);
|
|
|
}
|
|
|
};
|
|
@@ -417,7 +419,7 @@ const gatherChapter = {
|
|
|
}
|
|
|
if (rd[rb.key]) {
|
|
|
const c = this._getGclChapter(gclChapter, rd, rb.key);
|
|
|
- gatherRelaFields(c, rd, rb.fields);
|
|
|
+ if (c) gatherRelaFields(c, rd, rb.fields);
|
|
|
}
|
|
|
}
|
|
|
}
|