pts icon indicating copy to clipboard operation
pts copied to clipboard

`CanvasSpace` `constructor`: when `elem` is empty, expected creation of default canvas does not happen

Open dogfuntom opened this issue 9 months ago • 1 comments

AFAIK, null results in an exception and "" string turns into "#" string: https://github.com/williamngan/pts/blob/0f350d4145efd2d54a57a7cd29d3c9a03a4e6bbb/src/Canvas.ts#L55-L57

This seems to make the create a default canvas case code completely unreachable: https://github.com/williamngan/pts/blob/0f350d4145efd2d54a57a7cd29d3c9a03a4e6bbb/src/Canvas.ts#L62-L63

dogfuntom avatar Apr 01 '25 19:04 dogfuntom