Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into master
  • Loading branch information
Daniel15 authored Jul 2, 2017
commit 80839fa5e6d024686b65595b35f341b3261417a9
12 changes: 2 additions & 10 deletions src/React.Core/Resources/shims.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,14 @@ MockConsole.prototype = {
serializedArgs.push(JSON.stringify(arguments[i]));
}

var callstack = this._getCallStack();

this._calls.push({
method: methodName,
args: serializedArgs,
stack: callstack ? '"Call stack: ' + callstack : 'not available'
stack: '\nCall stack: ' + (new Error().stack || 'not available')
});
},
_formatCall: function(call) {
return 'console.' + call.method + '("[.NET]", ' + call.args.join(', ') + ',' + call.stack + ');';
},
_getCallStack: function() {
var stack = new Error().stack;
return stack
? stack.replace(/[\n\r]/g, '\\n') + '"'
: '';
return 'console.' + call.method + '("[.NET]", ' + call.args.join(', ') + ', ' + JSON.stringify(call.stack) + ');';
},
getCalls: function() {
return this._calls.map(this._formatCall).join('\n');
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.