Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
config and plugins are always objects
Browse files Browse the repository at this point in the history
  • Loading branch information
shvaikalesh committed Sep 7, 2016
1 parent d4e849d commit 2dbf7ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
const esprima = require('esprima');

class JavaScriptCompiler {
constructor(brunchCfg) {
this.config = brunchCfg && brunchCfg.plugins && brunchCfg.plugins.javascript || {};
this.validate = this.config.validate;
if (this.validate == null) this.validate = true;
constructor(config) {
const js = config.plugins.javascript || {};
this.validate = 'validate' in js ? js.validate : true;
}

compile(params) {
Expand Down

0 comments on commit 2dbf7ec

Please sign in to comment.