We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59be244 commit 60e490fCopy full SHA for 60e490f
src/vector/vector.js
@@ -1032,8 +1032,10 @@ acgraph.vector.parseKey = function(key) {
1032
* @return {number} Thickness of the stroke.
1033
*/
1034
acgraph.vector.getThickness = function(stroke) {
1035
- var res = stroke['thickness'];
1036
- return stroke == 'none' ? 0 : (isNaN(res) || goog.isNull(res) ? 1 : res);
+ var res;
+ return (stroke && stroke != 'none') ?
1037
+ (isNaN(res = stroke['thickness']) || goog.isNull(res) ? 1 : res) :
1038
+ 0;
1039
};
1040
1041
0 commit comments