Skip to content

Commit cfc84f3

Browse files
authored
Merge pull request #2434 from jacobherrington/chore-remove-console-logs
Remove console.logs
2 parents 27e5010 + 7b3d5ab commit cfc84f3

14 files changed

+6
-25
lines changed

browser/main/Detail/SnippetNoteDetail.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,10 @@ class SnippetNoteDetail extends React.Component {
354354
this.refs['code-' + this.state.snippetIndex].reload()
355355

356356
if (this.visibleTabs.offsetWidth > this.allTabs.scrollWidth) {
357-
console.log('no need for arrows')
358357
this.moveTabBarBy(0)
359358
} else {
360359
const lastTab = this.allTabs.lastChild
361360
if (lastTab.offsetLeft + lastTab.offsetWidth < this.visibleTabs.offsetWidth) {
362-
console.log('need to scroll')
363361
const width = this.visibleTabs.offsetWidth
364362
const newLeft = lastTab.offsetLeft + lastTab.offsetWidth - width
365363
this.moveTabBarBy(newLeft > 0 ? -newLeft : 0)
@@ -627,7 +625,6 @@ class SnippetNoteDetail extends React.Component {
627625
}
628626

629627
focusEditor () {
630-
console.log('code-' + this.state.snippetIndex)
631628
this.refs['code-' + this.state.snippetIndex].focus()
632629
}
633630

browser/main/Main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class Main extends React.Component {
8080
}
8181
})
8282
.then(data => {
83-
console.log(data)
8483
store.dispatch({
8584
type: 'ADD_STORAGE',
8685
storage: data.storage,

browser/main/NoteList/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class NoteList extends React.Component {
5656
super(props)
5757

5858
this.selectNextNoteHandler = () => {
59-
console.log('fired next')
6059
this.selectNextNote()
6160
}
6261
this.selectPriorNoteHandler = () => {
@@ -616,7 +615,6 @@ class NoteList extends React.Component {
616615
.catch((err) => {
617616
console.error('Cannot Delete note: ' + err)
618617
})
619-
console.log('Notes were all deleted')
620618
} else {
621619
if (!confirmDeleteNote(confirmDeletion, false)) return
622620

@@ -636,7 +634,6 @@ class NoteList extends React.Component {
636634
})
637635
})
638636
AwsMobileAnalyticsConfig.recordDynamicCustomEvent('EDIT_NOTE')
639-
console.log('Notes went to trash')
640637
})
641638
.catch((err) => {
642639
console.error('Notes could not go to trash: ' + err)

browser/main/SideNav/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ class SideNav extends React.Component {
306306
.catch((err) => {
307307
console.error('Cannot Delete note: ' + err)
308308
})
309-
console.log('Trash emptied')
310309
}
311310

312311
handleFilterButtonContextMenu (event) {

browser/main/lib/AwsMobileAnalyticsConfig.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ function initAwsMobileAnalytics () {
4545
if (getSendEventCond()) return
4646
AWS.config.credentials.get((err) => {
4747
if (!err) {
48-
console.log('Cognito Identity ID: ' + AWS.config.credentials.identityId)
4948
recordDynamicCustomEvent('APP_STARTED')
5049
recordStaticCustomEvent()
5150
}
@@ -58,7 +57,7 @@ function recordDynamicCustomEvent (type, options = {}) {
5857
mobileAnalyticsClient.recordEvent(type, options)
5958
} catch (analyticsError) {
6059
if (analyticsError instanceof ReferenceError) {
61-
console.log(analyticsError.name + ': ' + analyticsError.message)
60+
console.error(analyticsError.name + ': ' + analyticsError.message)
6261
}
6362
}
6463
}
@@ -71,7 +70,7 @@ function recordStaticCustomEvent () {
7170
})
7271
} catch (analyticsError) {
7372
if (analyticsError instanceof ReferenceError) {
74-
console.log(analyticsError.name + ': ' + analyticsError.message)
73+
console.error(analyticsError.name + ': ' + analyticsError.message)
7574
}
7675
}
7776
}

browser/main/lib/dataApi/attachmentManagement.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ function handleAttachmentLinkPaste (storageKey, noteKey, linkText) {
529529
return modifiedLinkText
530530
})
531531
} else {
532-
console.log('One if the parameters was null -> Do nothing..')
533532
return Promise.resolve(linkText)
534533
}
535534
}

browser/main/lib/dataApi/renameStorage.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ function renameStorage (key, name) {
1414
cachedStorageList = JSON.parse(localStorage.getItem('storages'))
1515
if (!_.isArray(cachedStorageList)) throw new Error('invalid storages')
1616
} catch (err) {
17-
console.log('error got')
1817
console.error(err)
1918
return Promise.reject(err)
2019
}

browser/main/lib/dataApi/resolveStorageData.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,9 @@ function resolveStorageData (storageCache) {
3131

3232
const version = parseInt(storage.version, 10)
3333
if (version >= 1) {
34-
if (version > 1) {
35-
console.log('The repository version is newer than one of current app.')
36-
}
3734
return Promise.resolve(storage)
3835
}
3936

40-
console.log('Transform Legacy storage', storage.path)
4137
return migrateFromV6Storage(storage.path)
4238
.then(() => storage)
4339
}

browser/main/lib/dataApi/resolveStorageNotes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function resolveStorageNotes (storage) {
99
notePathList = sander.readdirSync(notesDirPath)
1010
} catch (err) {
1111
if (err.code === 'ENOENT') {
12-
console.log(notesDirPath, ' doesn\'t exist.')
12+
console.error(notesDirPath, ' doesn\'t exist.')
1313
sander.mkdirSync(notesDirPath)
1414
} else {
1515
console.warn('Failed to find note dir', notesDirPath, err)

browser/main/lib/dataApi/toggleStorage.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ function toggleStorage (key, isOpen) {
1212
cachedStorageList = JSON.parse(localStorage.getItem('storages'))
1313
if (!_.isArray(cachedStorageList)) throw new Error('invalid storages')
1414
} catch (err) {
15-
console.log('error got')
1615
console.error(err)
1716
return Promise.reject(err)
1817
}

0 commit comments

Comments
 (0)