Update ui-bootstrap.js

protect against going beyond the lhs of window