Skip to content

Error using the source bundle #107

@nrenner

Description

@nrenner

The unminified Rollup bundle dist/L.Control.Heightgraph.js has the dependencies in global scope. The module wrapper only encloses the plugin itself.

Loading this source bundle directly leads to an error, see http://plnkr.co/edit/SZzWSpopCELzDcgu?preview (see Console):

Uncaught TypeError: Cannot set property top of #<Window> which has only a getter
    at L.Control.Heightgraph.js:3993

Concatenating it with the BRouter-Web dependencies e.g. leads to a conflict with Turf.js, see #101 (comment).

The mininfied bundle dist/L.Control.Heightgraph.min.js works, as it is enclosed in an IIFE (immediately invoked function expression):

!function(){ ... }();

So it would be great if the source bundle could be enclosed in an IIFE as well or the module wrapper moved to the top.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions