Skip to content

missing var declaration on mixpanel-jslib-snippet.js #215

Closed
@agustinhaller

Description

@agustinhaller

Hi, this is a simple one to fix.
I noticed there are a couple var declarations missing in the mixpanel-jslib-snippet.js file.

call2_args = arguments;
call2 = [fn_name].concat(Array.prototype.slice.call(call2_args, 0));

As I'm using the snippet source code to load mixpanel lib from my Typescript code asynchronously. The Typescript compiler is complaining about those missing var declarations.

If you wonder why I'm using the snippet code directly in my Typescript files, it's because I don't want to include the snippet in my index.html as I want to keep scripts in the index.html file to a minimum to avoid blocking the UI thread.
I think this approach is a nice workaround for this issue.

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