Some minor bug fixing

This commit is contained in:
Max G 2020-01-03 01:54:11 +00:00
parent abb4e20ec3
commit 68effaa5c3
4 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,6 @@
axios.post('/api/note/delete', {'noteId':this.noteId}).then(response => { axios.post('/api/note/delete', {'noteId':this.noteId}).then(response => {
if(response.data == true){ if(response.data == true){
console.log('Lets delete this note!')
this.$bus.$emit('note_deleted', this.noteId) this.$bus.$emit('note_deleted', this.noteId)
} }
}) })

View File

@ -147,8 +147,8 @@
document.removeEventListener('visibilitychange', this.visibiltyChangeAction) document.removeEventListener('visibilitychange', this.visibiltyChangeAction)
this.$off() // Remove all event listeners // this.$off() // Remove all event listeners
this.$bus.$off() // this.$bus.$off()
//Trash editor instance on close //Trash editor instance on close
this.tinymce.remove() this.tinymce.remove()

View File

@ -249,12 +249,13 @@
}, },
beforeDestroy(){ beforeDestroy(){
console.log('Unbinging all events')
window.removeEventListener('scroll', this.onScroll) window.removeEventListener('scroll', this.onScroll)
window.removeEventListener('hashchange', this.hashChangeAction) window.removeEventListener('hashchange', this.hashChangeAction)
document.removeEventListener('visibilitychange', this.visibiltyChangeAction) document.removeEventListener('visibilitychange', this.visibiltyChangeAction)
this.$off() // Remove all event listeners
this.$bus.$off() //We want to remove event listeners, but something here is messing them up and preventing ALL event listeners from working
// this.$off() // Remove all event listeners
// this.$bus.$off()
}, },
mounted() { mounted() {
//Loads initial batch and tags //Loads initial batch and tags

View File

@ -190,7 +190,7 @@ Note.getDiffText = (userId, noteId, usersCurrentText, lastUpdated) => {
let newText = usersCurrentText.replace(/(\r\n|\n|\r)/gm,"") let newText = usersCurrentText.replace(/(\r\n|\n|\r)/gm,"")
if(noteObject.updated == lastUpdated){ if(noteObject.updated == lastUpdated){
console.log('No note diff') // console.log('No note diff')
resolve(null) resolve(null)
} }
@ -222,7 +222,7 @@ Note.getDiffText = (userId, noteId, usersCurrentText, lastUpdated) => {
} }
//Final change in notes //Final change in notes
console.log(returnData) // console.log(returnData)
resolve(returnData) resolve(returnData)
}) })