From 3c5c82d455c8c05bbcf97a5d4ff09829aa392d2d Mon Sep 17 00:00:00 2001 From: Pritesh Jain Date: Wed, 4 Nov 2026 08:55:46 +0530 Subject: [PATCH] fix: stop entry.getField printing entry data to the console MKT-22140. Remove the leftover debug console.log in the getField path walk. Co-Authored-By: Claude Opus 5.5 --- lib/entry.js | 2 -- test/entrySpec.js | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/entry.js b/lib/entry.js index 1a3a1d86..3ac69e08 100755 --- a/lib/entry.js +++ b/lib/entry.js @@ -84,8 +84,6 @@ class Entry { schema = schema.find(x => x.uid === key); if (!schema) { throw Error('schema not found'); } - console.log('mayhem', value); - value = value[key]; if ((schema.data_type === 'group' || schema.data_type === 'global_field') && schema.multiple === false diff --git a/test/entrySpec.js b/test/entrySpec.js index 744d110c..5cd246c6 100755 --- a/test/entrySpec.js +++ b/test/entrySpec.js @@ -48,6 +48,13 @@ describe('Entry', function () { expect(field.schema).toEqual(schema); }); + it('getField does not log entry data to the console', function () { + spyOn(console, 'log'); + entry.getField('group1.group'); + entry.getField('modular_blocks.0'); + expect(console.log).not.toHaveBeenCalled(); + }); + it('getField modular blocks, get complete block', function () { let uid = 'modular_blocks.0'; let schema = entry.content_type.schema[6].blocks[2];