Skip to content

When new keyword is missing, unhelpful error is thrown #2

@chadsaun

Description

@chadsaun

When this line of code is called...

var ctx = C2S(304.797, 26.109);

... then it gets the error...

Cannot set property 'width' of undefined

When I set a breakpoint in canvas2svg on line 196 in Chrome, sure enough "this" is undefined.

Sometimes if I step through it slowly enough though, "this" will be "Window". And even in that circumstance, I get this error...

Object [object global] has no method '__setDefaultStyles'

on line 202...

this.__setDefaultStyles();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions