Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 2132a84

Browse files
committed
Make debug lazy in main.js
1 parent 6368959 commit 2132a84

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
const { CompositeDisposable } = require('atom');
2-
const debug = require('debug');
32

43
let SpellCheckView = null;
54
let spellCheckViews = {};
65

76
const LARGE_FILE_SIZE = 2 * 1024 * 1024;
87

8+
let log = console.log
9+
910
module.exports = {
1011
activate() {
11-
const log = debug('spell-check');
12+
if (atom.config.get("spell-check.enableDebug")) {
13+
debug = require('debug');
14+
log = debug('spell-check');
15+
}
16+
1217
log('initializing');
1318

1419
this.subs = new CompositeDisposable();

0 commit comments

Comments
 (0)