Update js/grid.base.js

The change pertains to issue #259.