Opened 15 years ago

Last modified 13 years ago

#2876 closed defect

ShrinkSafe v0.1.0 will break javascript with multiple var inside if-else — at Initial Version

Reported by: guest Owned by: anonymous
Priority: high Milestone: 1.3
Component: ShrinkSafe Version:
Keywords: multiple variable definitions Cc:
Blocked By: Blocking:


shrinksafe (the online version as of april 28,2007 v0.1.0) will break a script if it's got multiple variable definitions for the same variable within an if-else:

function test(bVariable) {
	if (bVariable) {
		var aVariable='ok';
		var aVariable='not ok';

in the example above, shrinksafe will not recognize that 'aVariable' is the same variable and will assign two different variable names:

function test(_1){if(_1){var _2="ok";}else{var _3="not ok";}alert(_3);}

Change History (0)

Note: See TracTickets for help on using tickets.