Skip to content

Commit 77ff4cf

Browse files
authored
Merge pull request #862 from contentstack/bugfix/CS-39889
Error | Global field Import | Handle reference inside text field
2 parents c379bd8 + c55abe2 commit 77ff4cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/contentstack-import/src/lib/util/removeReferenceFields.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ const _ = require('lodash');
44
const removeReferenceFields = (module.exports = async function (schema, flag, stackAPIClient) {
55
for (let i = 0; i < schema.length; i++) {
66
if (schema[i].data_type === 'group') {
7-
removeReferenceFields(schema[i].schema, flag);
7+
removeReferenceFields(schema[i].schema, flag);
88
} else if (schema[i].data_type === 'blocks') {
99
for (var block in schema[i].blocks) {
1010
removeReferenceFields(schema[i].blocks[block].schema, flag);
1111
}
12-
} else if (schema[i].data_type === 'reference') {
12+
} else if (schema[i].data_type === 'reference' || schema[i].reference_to ) {
1313
flag.supressed = true;
1414
// Check if content-type exists
1515
// If exists, then no change should be required.

0 commit comments

Comments
 (0)