Skip to content

Commit 60e490f

Browse files
committed
DVF-2789 Some minor fixes
1 parent 59be244 commit 60e490f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/vector/vector.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,8 +1032,10 @@ acgraph.vector.parseKey = function(key) {
10321032
* @return {number} Thickness of the stroke.
10331033
*/
10341034
acgraph.vector.getThickness = function(stroke) {
1035-
var res = stroke['thickness'];
1036-
return stroke == 'none' ? 0 : (isNaN(res) || goog.isNull(res) ? 1 : res);
1035+
var res;
1036+
return (stroke && stroke != 'none') ?
1037+
(isNaN(res = stroke['thickness']) || goog.isNull(res) ? 1 : res) :
1038+
0;
10371039
};
10381040

10391041

0 commit comments

Comments
 (0)