From 2ab31a34628a2c80885dcb841b6bb948b97a0b88 Mon Sep 17 00:00:00 2001 From: bt Date: Mon, 5 May 2014 15:53:56 -0700 Subject: [PATCH] 1.1.2 - Working around this stacktrace.js bug for ie 10: https://github.com/stacktracejs/stacktrace.js/issues/80 --- README.md | 1 + generatedBuild/stackinfo.umd.js | 2 ++ package.json | 2 +- stackinfo.js | 2 ++ test/testStackinfo.html | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3a6e840..e21ccda 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ How to submit pull requests: Change Log ========= +* 1.1.2 - Working around this stacktrace.js bug for ie 10: https://github.com/stacktracejs/stacktrace.js/issues/80 * 1.1.1 - outputting line and column numbers as Numbers instead of as Strings. * 1.0.9 - fixing bug where the wrong stacktrace would be returned when one was passed in * 1.0.6 - exposing stacktrace.js's sourceCache so it can be consolidated with source caches from other modules diff --git a/generatedBuild/stackinfo.umd.js b/generatedBuild/stackinfo.umd.js index 6dd83d4..ce19bd8 100644 --- a/generatedBuild/stackinfo.umd.js +++ b/generatedBuild/stackinfo.umd.js @@ -523,6 +523,8 @@ module.exports = function(ex) { var options = undefined if(ex !== undefined) { + if(mode === 'ie' && ex.number === undefined) + ex.number = 1 // work around for this: https://github.com/stacktracejs/stacktrace.js/issues/80 options = {e:ex, guess: true} } var trace = printStackTrace(options) diff --git a/package.json b/package.json index 260f253..47134d9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ {"name":"stackinfo", - "version":"1.1.1", + "version":"1.1.2", "main":"stackinfo.js", "description": "Gets an object containing normalized stacktrace information across browsers.", "keywords": ["error", "stack", "trace", "javascript", "stacktrace", "exception", "crash"], diff --git a/stackinfo.js b/stackinfo.js index 5ba225f..f123b6b 100644 --- a/stackinfo.js +++ b/stackinfo.js @@ -8,6 +8,8 @@ module.exports = function(ex) { var options = undefined if(ex !== undefined) { + if(mode === 'ie' && ex.number === undefined) + ex.number = 1 // work around for this: https://github.com/stacktracejs/stacktrace.js/issues/80 options = {e:ex, guess: true} } var trace = printStackTrace(options) diff --git a/test/testStackinfo.html b/test/testStackinfo.html index 82ebb44..93bef88 100644 --- a/test/testStackinfo.html +++ b/test/testStackinfo.html @@ -76,7 +76,7 @@ testTraceline("ProtoObjectFactory. (http://localhost:8001/git/frontend/test/allTestsFE.bundle.js:1459:20)") testTraceline("(?)()@http://localhost:8001/git/frontend/test/allTestsFE.bundle.js:79:15") testTraceline("Object.module.exports.test.TabBar.buttons.callback [as click] (http://localhost:8001/git/frontend/test/allTestsFE.bundle.js:1546:9)") - } else if('firefox') { + } else if(stackinfo.mode === 'firefox') { testTraceline("(?)()@http://localhost:8100/test.web.bundle.js:75") }