Skip to content

Commit

Permalink
remove console.logs & improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AWolf81 committed May 26, 2019
1 parent 02576c4 commit 1a38771
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion browser/components/CodeEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,10 @@ export default class CodeEditor extends React.Component {
try {
Jsonlint.parse(customMarkdownLintConfig)
lintConfigJson = JSON.parse(customMarkdownLintConfig)
console.log(customMarkdownLintConfig, lintConfigJson)
} catch (err) {
throw err
eventEmitter.emit('APP_SETTING_ERROR')
return
}
const lintOptions = {
'strings': {
Expand Down
3 changes: 1 addition & 2 deletions browser/components/MarkdownEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ class MarkdownEditor extends React.Component {
}

reload () {
console.log('reloading editor...')
this.refs.code.reload()
this.cancelQueue()
this.renderPreview(this.props.value)
Expand Down Expand Up @@ -278,7 +277,7 @@ class MarkdownEditor extends React.Component {
if (this.props.ignorePreviewPointerEvents) previewStyle.pointerEvents = 'none'

const storage = findStorage(storageKey)
console.log('render editor', config)

return (
<div className={className == null
? 'MarkdownEditor'
Expand Down
1 change: 1 addition & 0 deletions browser/main/modals/PreferencesModal/UiTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class UiTab extends React.Component {
}})
}
this.handleSettingError = (err) => {
console.log('handle err', err)
this.setState({UiAlert: {
type: 'error',
message: err.message != null ? err.message : i18n.__('An error occurred!')
Expand Down

0 comments on commit 1a38771

Please sign in to comment.