Skip to content

Commit

Permalink
scope: fix a bug caused by Prototype and Mootools creating Array.prot…
Browse files Browse the repository at this point in the history
…otype.toJSON (#482)
  • Loading branch information
macbre committed May 30, 2015
1 parent 6062ca6 commit a9b5a9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@
**/

try {
// Prototype 1.6 (and Mootools 1.2 too) creates an Array.prototype.toJSON - issue #482
// @see http://stackoverflow.com/questions/710586/json-stringify-array-bizarreness-with-prototype-js
Array.prototype.toJSON = undefined;

origConsoleLog.call(console, 'msg:' + stringify({
type: type || false,
data: data || false
Expand Down

0 comments on commit a9b5a9d

Please sign in to comment.