The indentation debate has spawned a couple of long threads here in the past (as has the allied question, spaces vs. tabs).
Three design decisions collude here to cause the bug: (1) statement blocks and object literals have the same delimiters; (2) expressions ⊆ statements; and (3) automatic semicolon insertion.
(1) means you either want to indent object literals the way you indent statement blocks and vice versa, or you want different rules for braces depending on what they're delimiting.
(2) says that any expression is a statement - it doesn't have to be an assignment or a function call or something else with obvious side effects to stand on its own as a statement. In particular, object literals can stand on their own as statements. But if
(3) complete statements are on distinct lines, the semicolon between them is optional - the line break is presumably enough separation. During parsing a semicolon is automatically inserted between them if there isn't one already there.
Interpreted as "return undefined" and execution never reaches the literal.