parent
47c1c22712
commit
98ca8d22d2
@ -1,11 +1,11 @@
|
|||||||
--- src/drivers/npm/node_modules/zombie/lib/document.js 2018-04-20 14:36:04.097829977 +1000
|
--- src/drivers/npm/node_modules/zombie/lib/document.js
|
||||||
+++ src/drivers/npm/node_modules/zombie/lib/document.js 2018-04-20 14:34:25.699317000 +1000
|
+++ src/drivers/npm/node_modules/zombie/lib/document.js
|
||||||
@@ -281,7 +281,7 @@
|
@@ -247,7 +247,7 @@ function setupWindow(window, args) {
|
||||||
// The current window, postMessage and window.close need this
|
|
||||||
browser._windowInScope = window;
|
browser._windowInScope = window;
|
||||||
var result = undefined;
|
let result;
|
||||||
- if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, window, { filename: filename });else if (code) result = code.call(window);
|
if (typeof code == 'buffer' || code instanceof Buffer) code = code.toString();
|
||||||
+ if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, window, { filename: filename, timeout: 1000 });else if (code) result = code.call(window);
|
- if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, context, { filename });else if (code) result = code.call(window);
|
||||||
|
+ if (typeof code === 'string' || code instanceof String) result = VM.runInContext(code, context, { filename, timeout: 1000 });else if (code) result = code.call(window);
|
||||||
browser.emit('evaluated', code, result, filename);
|
browser.emit('evaluated', code, result, filename);
|
||||||
return result;
|
return result;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in new issue