File tree 1 file changed +5
-9
lines changed
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 37
37
req . send ( data ) ;
38
38
}
39
39
40
- if ( typeof console !== 'object' ) {
41
- var console = { } ;
42
- window . console = console ;
43
- }
44
-
45
- _console_log = console . log ;
46
-
47
- console . log = function ( ) {
40
+ var browserstack_console = console || window . console || { } ;
41
+ browserstack_console . log = function ( ) {
48
42
var args = BrowserStack . util . toArray ( arguments ) . map ( BrowserStack . util . inspect ) ;
49
43
post ( '/_log/' , { arguments : args } , function ( ) { } ) ;
50
44
} ;
51
- console . warn = function ( ) {
45
+ browserstack_console . warn = function ( ) {
52
46
var args = BrowserStack . util . toArray ( arguments ) . map ( BrowserStack . util . inspect ) ;
53
47
post ( '/_log/' , { arguments : args } , function ( ) { } ) ;
54
48
} ;
60
54
BrowserStack . worker_uuid = getParameterByName ( '_worker_key' ) ;
61
55
62
56
window . BrowserStack = BrowserStack ;
57
+ window . console = browserstack_console ;
58
+ console = browserstack_console ;
63
59
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments