Skip to content

Issue in "blockClass" array for "search-result-layout.mobile" block (v3.140.3 or later) #725

@AlexJSant

Description

@AlexJSant

Describe the bug
When you define the blockClass as an array in the search-result-layout.mobile block, VTEX crashes. The link below contains GPT’s explanation of the console error returned in Chrome. I’m not sure why, but this block doesn’t accept multiple classes defined in the "blockClass" prop when passed as an array.

https://chatgpt.com/share/68f7d22c-df20-8008-a5e3-688c16f0dd57

To Reproduce
Steps to reproduce the behavior:

  1. Use "search-result-layout.mobile" block (mobile responsive);
  2. Add a blockClass prop anywhere, and include more than one class using an array;
  3. Example: "blockClass": ["search-content", "search-content-bf"];
  4. When you link the app to test, VTEX will throw an error like the one shown in the attached screenshot.

Screenshots
Image

Expected behavior
It should work properly with multiple classes defined in the "blockClass" prop.

Mobile environment:
Tested only on iPhone 11 Pro Max and Chrome DevTools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions