Else If running even though conditions not met

Okay, I’ve been staring at this thing for a long time with no success, so any help will be appreciated. In the code below, I have an enemy character that patrols a spot until the player comes within distance of the raycast. While the player is hit by the raycast, the enemy should stop patrolling and start shooting at the player. The problem I’m running into is that the enemy unit continues patrolling between shots. He will stop, shoot, walk again until the timer runs out, stop, shoot, etc. I feel like something about the timer I’ve set up is messing with the raycast since the enemy shouldn’t patrol while the player is within range, but I can’t for the life of me figure out how to fix it. I’m a total noob, so simple answers will be appreciated.

void Update () {
		playerPos = GameObject.FindGameObjectWithTag ("Player").transform.position;
		direction = (playerPos - (new Vector2 (transform.position.x, transform.position.y))).normalized;
		hit = Physics2D.Raycast (transform.position, direction, bulletDistance);
		tempBulletsTimer -= Time.deltaTime;
		Debug.Log (hit);
		if (hit.collider != null && hit.collider.tag == Tag.Player && tempBulletsTimer <= 0) {
			Instantiate (bullet, transform.position, transform.rotation);
			Debug.DrawLine (transform.position, playerPos, Color.red, .01f);
			tempBulletsTimer = 1;
		} else if (hit.collider == null || hit.collider.tag != Tag.Player) {
			transform.Translate (Patrol ());
		}
	}

Check this:

    Transform playerTransform;

    void Start() {
        //start runs once game object (to which this script is attached) is bourn.
        //Runs only once, so use this expensive "Find" function once, and not every frame
        playerTransform = GameObject.FindGameObjectWithTag("Player").transform;
    }


    void Update() {
        //you had something weird going on with Vector2 here:
        direction = (playerTransform.position - transform.position).normalized;

        hit = Physics2D.Raycast(transform.position, direction, bulletDistance);

        tempBulletsTimer -= Time.deltaTime;

        if (hit.collider == null || hit.collider.tag != Tag.Player) {
            transform.Translate(Patrol());
            return;
        }

        //otherwise, we still didn't return. Conditions must have been met!
        //we are now sure that "hit" is NOT null and the player has correct tag.

        if (tempBulletsTimer <= 0) {

            Instantiate(bullet, transform.position, transform.rotation);
            Debug.DrawLine(transform.position, playerPos, Color.red, .01f);
            tempBulletsTimer = 1;
        } 

    }//end Update()
}

I managed to figure out a better way to approach this one that solved my problem. Thanks for the input.