Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

GeoJSON.Collision throws Cannot read property errors #16

@5310

Description

@5310

It seems that the GeoJSON version of this addon can't find the extended properties on itself. Simply calling L.geoJSON.collision(...) throws

Uncaught (in promise) TypeError: Cannot read property 'push' of undefined
    at NewClass.addLayer (collision.js:26)
    at NewClass.addData (GeoJSON.js:127)
    at NewClass.addData (GeoJSON.js:104)
    at NewClass.initialize (GeoJSON.js:89)
    at NewClass.initialize (collision.js:9)
    at new NewClass (Class.js:22)
    at Function.L.geoJson.collision (collision.js:240)
    at main.js:27

I noticed there's only ever been one issue regarding GeoJSON on this repository, the one that added conditional calling of the parent constructor if the parent class was GeoJSON. But it doesn't seem to make any difference either way whether that patch is used or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions