From 8c2a9daf8f0ea513fec5f3efba0afd4704c1775d Mon Sep 17 00:00:00 2001 From: michaelzoidl Date: Fri, 7 Aug 2015 22:13:57 +0200 Subject: [PATCH] Handle new cases in transformRelativeToRootPath method --- plugin/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/index.js b/plugin/index.js index 7317ef9..da6c8af 100644 --- a/plugin/index.js +++ b/plugin/index.js @@ -24,8 +24,10 @@ export default function create(babel) { const withoutTilde = path.substring(2, path.length); return `${this.root}/${withoutTilde}`; } - - return '123'; + if (typeof path === 'string') { + return path; + } + throw new Error('ERROR: No path passed'); } hasTildeInString(string) {