From 4bae820a5ab89535033dcb8b7c6f2606d3ecff1d Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 9 Nov 2014 16:37:47 +1100 Subject: [PATCH] remove Error.captureStackTrace monkey patch as it's no longer necessary with the latest ast-types --- lib/6to5/browser.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/6to5/browser.js b/lib/6to5/browser.js index 82596a306d..e76451a286 100644 --- a/lib/6to5/browser.js +++ b/lib/6to5/browser.js @@ -1,21 +1,3 @@ -// this is gross but it monkey patches in behaviour required by `depd` used by -// `ast-types` -Error.captureStackTrace = Error.captureStackTrace || function (obj) { - if (Error.prepareStackTrace) { - var frame = { - isEval: function () { return false; }, - getFileName: function () { return "filename"; }, - getLineNumber: function () { return 1; }, - getColumnNumber: function () { return 1; }, - getFunctionName: function () { return "functionName"; } - }; - - obj.stack = Error.prepareStackTrace(obj, [frame, frame, frame]); - } else { - obj.stack = obj.stack || obj.name || "Error"; - } -}; - var transform = module.exports = require("./transformation/transform"); transform.transform = transform;