lib/watirsplash/page/base.rb in watirsplash-2.3.0 vs lib/watirsplash/page/base.rb in watirsplash-2.3.1

- old
+ new

@@ -12,14 +12,13 @@ end def initialize(browser=nil) if browser - @browser = WatirSplash::Browser.current = browser + @browser = browser else - @browser = (WatirSplash::Browser.current && - WatirSplash::Browser.current.exists?) || - WatirSplash::Browser.new + reuse_current = WatirSplash::Browser.current && WatirSplash::Browser.current.exists? + @browser = reuse_current ? WatirSplash::Browser.current : (WatirSplash::Browser.current = WatirSplash::Browser.new) @browser.goto @@url end end def redirect_to page, browser=nil