" In your sentence, the conjunction that introduces the conditional clause is missing. The second sentence is fine. When a conditional clause contains one of the auxiliary verbs "were", "had" or "should", it can be replaced by a clause without "if" by inversion of verb and subject.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.