Skip to content

Commit 1a38771

Browse files
committed
remove console.logs & improve error handling
1 parent 02576c4 commit 1a38771

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

browser/components/CodeEditor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,10 @@ export default class CodeEditor extends React.Component {
642642
try {
643643
Jsonlint.parse(customMarkdownLintConfig)
644644
lintConfigJson = JSON.parse(customMarkdownLintConfig)
645+
console.log(customMarkdownLintConfig, lintConfigJson)
645646
} catch (err) {
646-
throw err
647+
eventEmitter.emit('APP_SETTING_ERROR')
648+
return
647649
}
648650
const lintOptions = {
649651
'strings': {

browser/components/MarkdownEditor.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ class MarkdownEditor extends React.Component {
194194
}
195195

196196
reload () {
197-
console.log('reloading editor...')
198197
this.refs.code.reload()
199198
this.cancelQueue()
200199
this.renderPreview(this.props.value)
@@ -278,7 +277,7 @@ class MarkdownEditor extends React.Component {
278277
if (this.props.ignorePreviewPointerEvents) previewStyle.pointerEvents = 'none'
279278

280279
const storage = findStorage(storageKey)
281-
console.log('render editor', config)
280+
282281
return (
283282
<div className={className == null
284283
? 'MarkdownEditor'

browser/main/modals/PreferencesModal/UiTab.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class UiTab extends React.Component {
4040
}})
4141
}
4242
this.handleSettingError = (err) => {
43+
console.log('handle err', err)
4344
this.setState({UiAlert: {
4445
type: 'error',
4546
message: err.message != null ? err.message : i18n.__('An error occurred!')

0 commit comments

Comments
 (0)