From f05bc8293f09b828eb9703cd6cd70e39a6cb4396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Segersv=C3=A4rd?= Date: Tue, 29 Dec 2015 16:16:42 +0100 Subject: [PATCH] Make failing test pass --- src/utils/transform.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/transform.js b/src/utils/transform.js index 761a217..5ddde28 100644 --- a/src/utils/transform.js +++ b/src/utils/transform.js @@ -25,6 +25,10 @@ export default function transform ( source, id, transformers ) { map: null }; } + // `result.map` can only be a string if `result` isn't + else if ( typeof result.map === 'string' ) { + result.map = JSON.parse( result.map ); + } sourceMapChain.push( result.map ); ast = result.ast;