Some minor bug fixing
This commit is contained in:
		@@ -29,7 +29,6 @@
 | 
			
		||||
 | 
			
		||||
				axios.post('/api/note/delete', {'noteId':this.noteId}).then(response => {
 | 
			
		||||
					if(response.data == true){
 | 
			
		||||
						console.log('Lets delete this note!')
 | 
			
		||||
						this.$bus.$emit('note_deleted', this.noteId)
 | 
			
		||||
					}
 | 
			
		||||
				})
 | 
			
		||||
 
 | 
			
		||||
@@ -147,8 +147,8 @@
 | 
			
		||||
 | 
			
		||||
			document.removeEventListener('visibilitychange', this.visibiltyChangeAction)
 | 
			
		||||
 | 
			
		||||
			this.$off() // Remove all event listeners
 | 
			
		||||
			this.$bus.$off()
 | 
			
		||||
			// this.$off() // Remove all event listeners
 | 
			
		||||
			// this.$bus.$off()
 | 
			
		||||
 | 
			
		||||
			//Trash editor instance on close
 | 
			
		||||
			this.tinymce.remove()
 | 
			
		||||
 
 | 
			
		||||
@@ -249,12 +249,13 @@
 | 
			
		||||
 | 
			
		||||
		},
 | 
			
		||||
		beforeDestroy(){
 | 
			
		||||
			console.log('Unbinging all events')
 | 
			
		||||
			window.removeEventListener('scroll', this.onScroll)
 | 
			
		||||
			window.removeEventListener('hashchange', this.hashChangeAction)
 | 
			
		||||
			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() {
 | 
			
		||||
			//Loads initial batch and tags
 | 
			
		||||
 
 | 
			
		||||
@@ -190,7 +190,7 @@ Note.getDiffText = (userId, noteId, usersCurrentText, lastUpdated) => {
 | 
			
		||||
			let newText = usersCurrentText.replace(/(\r\n|\n|\r)/gm,"")
 | 
			
		||||
 | 
			
		||||
			if(noteObject.updated == lastUpdated){
 | 
			
		||||
				console.log('No note diff')
 | 
			
		||||
				// console.log('No note diff')
 | 
			
		||||
				resolve(null)
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
@@ -222,7 +222,7 @@ Note.getDiffText = (userId, noteId, usersCurrentText, lastUpdated) => {
 | 
			
		||||
  			}
 | 
			
		||||
  			
 | 
			
		||||
  			//Final change in notes
 | 
			
		||||
  			console.log(returnData)
 | 
			
		||||
  			// console.log(returnData)
 | 
			
		||||
 | 
			
		||||
			resolve(returnData)
 | 
			
		||||
		})
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user