Skip to content

Commit

Permalink
fix(ScriptTransformer): Handle invalid results
Browse files Browse the repository at this point in the history
Related to #24
  • Loading branch information
LukasHechenberger committed Mar 8, 2017
1 parent ac719e3 commit b80be42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transform/ScriptTransformer.js
Expand Up @@ -33,7 +33,7 @@ export default class ScriptTransformer extends XMLTransformer {
Logger.warn(`Empty document at ${file.relative}`);
}

const document = results ? results.script : {};
const document = results && results.script ? results.script : {};

const config = {};
let code = '';
Expand Down

0 comments on commit b80be42

Please sign in to comment.