Skip to content

Commit

Permalink
Fix work with empty settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmlnc committed Sep 25, 2016
1 parent 2862e20 commit 42e790d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ export function activate(context: vscode.ExtensionContext) {
return;
}

const remarkSettings = vscode.workspace.getConfiguration('remark').get<IRemarkSettings>('format');
let remarkSettings = vscode.workspace.getConfiguration('remark').get<IRemarkSettings>('format');
remarkSettings = Object.assign(<IRemarkSettings>{
plugins: [],
rules: []
}, remarkSettings);

if (remarkSettings.plugins.length !== 0) {
return getPlugins(remarkSettings.plugins).then((plugins) => {
Expand Down

0 comments on commit 42e790d

Please sign in to comment.