JS1207: Did you intend to have an empty statement for this branch of the if statement?

The code has an if statement followed by a semicolon. The semicolon is interpreted as the terminator for an empty statement that is executed when the conditional expression in the if statement is true.

To correct this error

  1. Remove the semicolon.

  2. Follow the if statement with an empty block ({}).

See Also

Concepts

Troubleshooting Your Scripts

Reference

if...else Statement

Other Resources

JScript Reference