From e47e9cb093c9e768e6b31981211e2d93f73738fa Mon Sep 17 00:00:00 2001 From: Javier Arancibia Date: Mon, 24 Feb 2020 12:03:35 +0100 Subject: [PATCH] fixes justinkames#35 --- src/vue-logger.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vue-logger.ts b/src/vue-logger.ts index bd2cde3..a8d1502 100644 --- a/src/vue-logger.ts +++ b/src/vue-logger.ts @@ -48,6 +48,13 @@ class VueLogger implements ILogger { } catch (e) { error = e; } + + //@babel/runtime: function name comes after a certain line + if (error.stack.split("asyncToGenerator.js:30:12").length > 1) { + let split = error.stack.split("asyncToGenerator.js:30:12") + return split[1].substring(0, split[1].indexOf("@web")).split('\n_').join('') + } + // IE9 does not have .stack property if (error.stack === undefined) { return "";