Skip to content

bug: Shape.shadows is potentially null #191

Open
penpot/penpot
#6114
@malliaridis

Description

@malliaridis

Steps To Reproduce

  1. Create board
  2. Access the shape's shadows via penpot.selection.shapes[id].shadows

Expected behavior

Shape.shadows is not null, but empty array [] in case when there is no shadow set for a shape.

Actual behavior

Shape.shadows is null.

Screenshots or video

No response

Desktop (please complete the following information)

No response

Smartphone (please complete the following information)

Browser / Chrome

Environment (please complete the following information)

https://design.penpot.app

Frontend Stack Trace

Backend Stack Trace

Additional context

When trying to access the shadows from a Shape, if no shadows are defined, the field is null instead of empty array [] as the API (and penpot-types define it).

I am not sure if the plugins API should be updated or if this should be updated in penpot so that it returns an empty array instead (which is preferred).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmanaged on taigaThis issue has been moved to our project at Taiga.io

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions