From 332f80a696392ac3968dca123c458ab0fc62abd9 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 5 Oct 2012 00:37:24 +0100 Subject: [PATCH] Remove unnecessary conditional --- lib/capybara/poltergeist/client/browser.coffee | 4 +--- lib/capybara/poltergeist/client/compiled/browser.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/capybara/poltergeist/client/browser.coffee b/lib/capybara/poltergeist/client/browser.coffee index 37b6b5b..1cc415b 100644 --- a/lib/capybara/poltergeist/client/browser.coffee +++ b/lib/capybara/poltergeist/client/browser.coffee @@ -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) diff --git a/lib/capybara/poltergeist/client/compiled/browser.js b/lib/capybara/poltergeist/client/compiled/browser.js index 1ea66d3..79b04b3 100644 --- a/lib/capybara/poltergeist/client/compiled/browser.js +++ b/lib/capybara/poltergeist/client/compiled/browser.js @@ -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() {