Skip to main content
1 of 2
David Reed
  • 93.7k
  • 14
  • 90
  • 166
if (standardSearch = true) {

You are performing an assignment with = inside this if statement. Use == to compare for equality.

As a guard against this kind of mistake, you can write the constant first:

if (true == standardSearch) {

Then you get an error if you write the wrong number of = signs.

David Reed
  • 93.7k
  • 14
  • 90
  • 166