comic.js icon indicating copy to clipboard operation
comic.js copied to clipboard

issue with complex paths...

Open mugendi opened this issue 8 years ago • 2 comments

Hello, I love your library. However, with some complex curves, I came across an error on line 12685. The problem is that list == undefined and as such !list.length throws an error.

My fix was to edited the code to:

if(!list ) list =  {};
else if(!list.length) list = list._list ;

mugendi avatar Jul 31 '16 17:07 mugendi

Hey @mugendi, thanks a lot for your feedback, I'm happy to hear you like comic.js. Now as for the problem you reported:

You are right that if on line 1285 list should be undefined this will cause an error. However, for this reason on line 1284 there is list = path.pathSegList || newPath.pathSegList and before newPath is created on line 1281 if ! path.pathSegList. What happens here with near certainty is the Chrome bug described in this open issue.

The conclusion is that this is a sad situation for Chrome users and I will try to make a new release soon that includes an own replacement for the missing Chrome API.

balint42 avatar Aug 01 '16 20:08 balint42

Well noted. Thanks

mugendi avatar Aug 08 '16 12:08 mugendi