Skip to content

Commit 8c2a9da

Browse files
author
michaelzoidl
committed
Handle new cases in transformRelativeToRootPath method
1 parent 4f680f3 commit 8c2a9da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugin/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ export default function create(babel) {
2424
const withoutTilde = path.substring(2, path.length);
2525
return `${this.root}/${withoutTilde}`;
2626
}
27-
28-
return '123';
27+
if (typeof path === 'string') {
28+
return path;
29+
}
30+
throw new Error('ERROR: No path passed');
2931
}
3032

3133
hasTildeInString(string) {

0 commit comments

Comments
 (0)