Is it a Bug? uJS if-else, undefined variable not flagged

In the following code, playMode is defined, PlayMode is NOT defined.

When playMode is Not 0 (so to trigger the else), if(PlayMode == 1) does not seem to spot that PlayMode is undefined.

function FixedUpdate ()
{
	//Gubbings removed
	
	if(playMode == 0) //playMode Defined
	{
		//Gubbings Removed
	}
	else if(PlayMode == 1) //PlayMode UN-Defined
	{
		
	}
}

Is it a bug? Should I report it?

There’s nothing really wrong since PlayMode is actually defined, it’s an enum type. Since UnityScript automatically returns the Type object reference when using a type as constant you’re actually comparing a Type reference to an integer.