Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15756 closed task (fixed)

Element.js unreachable code

Reported by: bill Owned by: Eugene Lazutkin
Priority: undecided Milestone: 1.9
Component: Charting Version: 1.8.0rc1
Keywords: Cc:
Blocked By: Blocking:

Description

Final return statement meaningless:

_pseudoRadialFill: function(fill, center, radius, start, end){
	// process pseudo-radial fills
	if(!fill || fill.type !== "radial" || fill.space !== "shape"){
		return fill;
	}
	// clone and normalize fill
	var space = fill.space;
	fill = gfx.makeParameters(gfx.defaultRadialGradient, fill);
	fill.space = space;
	if(arguments.length < 4){
		// process both dimensions
		fill.cx = center.x;
		fill.cy = center.y;
		fill.r  = fill.r * radius / 100;
		return fill;
	}
	// convert to a linear gradient
	var angle = arguments.length < 5 ? start : (end + start) / 2;
	return {
		type: "linear",
		x1: center.x,
		y1: center.y,
		x2: center.x + fill.r * radius * Math.cos(angle) / 100,
		y2: center.y + fill.r * radius * Math.sin(angle) / 100,
		colors: fill.colors
	};
	return fill;
}

Change History (3)

comment:1 Changed 7 years ago by bill

Type: defecttask
Version: 1.7.31.8.0rc1

comment:2 Changed 7 years ago by cjolif

Resolution: fixed
Status: newclosed

In [29666]:

fixes #15756. Remove unreachable return statement. !strict.

comment:3 Changed 7 years ago by bill

Milestone: tbd1.9
Note: See TracTickets for help on using tickets.