web2py/web2py — pull request #490 by ilvalle (2014-09-05 14:20:49+00:00)
Title: fix web2py.js with show_if and grid

Given this example (with or without rows)
```python
db.define_table('stuff',
Field('approved', 'boolean'),
Field('approved_on', 'datetime')
)
db.stuff.approved_on.show_if = (db.stuff.approved == True)
grid = SQLFORM.grid(db.stuff, user_signature=False)
return dict(grid=grid)
```
web2py.js fails raising a javascript exception