Merge pull request #3363 from danez/patch-1
fix(babel-template): Fix Error in IE <= 9
This commit is contained in:
commit
891becffc1
@ -18,7 +18,10 @@ export default function (code: string, opts?: Object): Function {
|
||||
// error stack gets populated in IE only on throw (https://msdn.microsoft.com/en-us/library/hh699850(v=vs.94).aspx)
|
||||
throw new Error();
|
||||
} catch (error) {
|
||||
stack = error.stack.split("\n").slice(1).join("\n");
|
||||
if (error.stack) {
|
||||
// error.stack does not exists in IE <= 9
|
||||
stack = error.stack.split("\n").slice(1).join("\n");
|
||||
}
|
||||
}
|
||||
|
||||
let getAst = function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user