Indentation breaks when using 2 spaces for indentation.
To reproduce, first set this options:
:set tabstop=2 | set shiftwidth=2 | set softtabstop=2 | set expandtab
Then try this code and you should see that is indented as follows:
var foo = bar({
a: 0,
b:1
});
Setting indentation to 4 spaces fixes this.