File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 7676
7777 // A simple log function so the user knows why a request is not being send
7878 warn = function ( ) {
79- if ( con && con . warn ) {
80- // 1. Convert args to a normal array
81- var args = [ ] . slice . call ( arguments ) ;
79+ // 1. Convert args to a normal array
80+ var args = [ ] . slice . call ( arguments ) ;
8281
83- // 2. Prepend log prefix
84- args . unshift ( "Simple Analytics:" ) ;
82+ // 2. Prepend log prefix
83+ args . unshift ( "Simple Analytics: " ) ;
8584
86- // 3. Pass along arguments to console.warn
87- con . warn . apply ( con , args ) ;
88- }
85+ // 3. Pass along arguments to console.warn
86+ // Function.prototype.bind.call is needed for Internet Explorer
87+ var log = Function . prototype . bind . call ( con . warn , con ) ;
88+ log . apply ( con , args ) ;
8989 } ;
9090
9191 var warnInFunction = function ( name , error ) {
You can’t perform that action at this time.
0 commit comments