Merge branch 'refresh-first-pg' of sloum/bombadillo into develop
Merges in a fix to using the _reload_ command when on the first history location. It was previously not working.
This commit is contained in:
commit
ccc694fb2f
10
client.go
10
client.go
|
@ -726,9 +726,13 @@ func (c *client) ReloadPage() error {
|
|||
return fmt.Errorf("There is no page to reload")
|
||||
}
|
||||
url := c.PageState.History[c.PageState.Position].Location.Full
|
||||
err := c.PageState.NavigateHistory(-1)
|
||||
if err != nil {
|
||||
return err
|
||||
if c.PageState.Position == 0 {
|
||||
c.PageState.Position--
|
||||
} else {
|
||||
err := c.PageState.NavigateHistory(-1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
length := c.PageState.Length
|
||||
c.Visit(url)
|
||||
|
|
Loading…
Reference in New Issue