1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00

Remove unnecessary conditional

This commit is contained in:
Jon Leighton 2012-10-05 00:37:24 +01:00
parent bdf584d37a
commit 332f80a696
2 changed files with 2 additions and 6 deletions

View file

@ -10,9 +10,7 @@ class Poltergeist.Browser
resetPage: ->
if @page?
@page.release()
# Remove the conditional when we stop supporting PhantomJS 1.6
phantom.clearCookies() if phantom.clearCookies
phantom.clearCookies()
@page = new Poltergeist.WebPage(@width, @height)

View file

@ -14,9 +14,7 @@ Poltergeist.Browser = (function() {
var _this = this;
if (this.page != null) {
this.page.release();
if (phantom.clearCookies) {
phantom.clearCookies();
}
phantom.clearCookies();
}
this.page = new Poltergeist.WebPage(this.width, this.height);
this.page.onLoadStarted = function() {