Skip to content

Commit

Permalink
fix TypeError: Cannot read property 'multiple' of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhaolin committed Aug 6, 2024
1 parent 522413c commit b5442f6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ const updateLookupOrMasterDetailFieldValues = function (field_map_back, values,
var objField = temObjFields[0];
var referObjField = temObjFields[1];
var oField = objectFields[objField];
if (!oField.multiple && ['lookup', 'master_detail'].includes(oField.type) && _.isString(oField.reference_to)) {
if (oField && !oField.multiple && ['lookup', 'master_detail'].includes(oField.type) && _.isString(oField.reference_to)) {
var oCollection = objectql.getObject(oField.reference_to)
if (oCollection && record && record[objField]) {
var referSetObj = {};
Expand All @@ -345,7 +345,7 @@ const updateLookupOrMasterDetailFieldValues = function (field_map_back, values,
var objField = temObjFields[0];
var referObjField = temObjFields[1];
var oField = objectFields[objField];
if (!oField.multiple && ['lookup', 'master_detail'].includes(oField.type) && _.isString(oField.reference_to)) {
if (oField && !oField.multiple && ['lookup', 'master_detail'].includes(oField.type) && _.isString(oField.reference_to)) {
var oCollection = objectql.getObject(oField.reference_to)
if (oCollection && record && record[objField]) {
var referSetObj = {};
Expand Down

0 comments on commit b5442f6

Please sign in to comment.