fix "cannot read property `top` of undefined" bug, when sidebar is empty