From 82989d95f7c00cd2df8804e6328d1db9b7e653d6 Mon Sep 17 00:00:00 2001 From: "chm@openerp.com" <> Date: Tue, 25 Mar 2014 10:25:47 +0100 Subject: [PATCH] [FIX] phantomjs: hide error if document.body does not exists bzr revid: chm@openerp.com-20140325092547-ilnbqdj4rhdo0q3r --- openerp/tests/phantomtest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/tests/phantomtest.js b/openerp/tests/phantomtest.js index 6957f741fd5..5a6a9696cc0 100644 --- a/openerp/tests/phantomtest.js +++ b/openerp/tests/phantomtest.js @@ -88,7 +88,7 @@ function PhantomTest() { self.page.evaluate(function () { var message = ("Timeout\nhref: " + window.location.href + "\nreferrer: " + document.referrer - + "\n\n" + document.body.innerHTML).replace(/[^a-z0-9\s~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "*"); + + "\n\n" + (document.body && document.body.innerHTML)).replace(/[^a-z0-9\s~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "*"); console.log('error', message); phantom.exit(1); });