Skip to content

Unsafe accessing of nullable properties #216

Open
@paulkaplan

Description

@paulkaplan

I found several places where we are accessing nullable properties in an unsafe way. A few of these were reported automatically through Sentry with type errors like Cannot read property 'rotationCenter' of null.

Drawable.js (mostly accessing properties of the skin without checking it exists)

@rschamp @cwillisf We tend to do this a lot in other repos (probably more than here, i'm not picking on render at all). It is a language trap that javascript lets you fall in easily and we aren't linting it (i'm not sure that is even possible?). Are there any design patterns we should think about that would help us from doing this type of thing?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions