Skip to content

Commit

Permalink
Fix browser.js error messages when testing whether replaceItem and in…
Browse files Browse the repository at this point in the history
…sertItemBefore work, since paths must start with M commands
  • Loading branch information
codedread committed Feb 14, 2016
1 parent 6715e62 commit 948ba30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var supportsPathReplaceItem_ = (function() {
var seglist = path.pathSegList;
var seg = path.createSVGPathSegLinetoAbs(5,5);
try {
seglist.replaceItem(seg, 0);
seglist.replaceItem(seg, 1);
return true;
} catch(err) {}
return false;
Expand All @@ -71,7 +71,7 @@ var supportsPathInsertItemBefore_ = (function() {
var seglist = path.pathSegList;
var seg = path.createSVGPathSegLinetoAbs(5,5);
try {
seglist.insertItemBefore(seg, 0);
seglist.insertItemBefore(seg, 1);
return true;
} catch(err) {}
return false;
Expand Down

1 comment on commit 948ba30

@codedread
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this only started being a problem when Chrome 49 shipped and the pathseg shim started throwing an error with a path that didn't start with a M command. Found while trying to debug issue #66

Please sign in to comment.