Kaynağa Gözat

Move line so that if clause did not always return false

sbkwgh 8 yıl önce
ebeveyn
işleme
52a3ec8441
1 değiştirilmiş dosya ile 2 ekleme ve 4 silme
  1. 2 4
      src/components/PostScrubber.vue

+ 2 - 4
src/components/PostScrubber.vue

@@ -102,13 +102,11 @@
 					this.clientY = e.clientY
 				}
 			})
-			window.addEventListener('mouseup', e => {
-				this.dragging = false
-				
+			window.addEventListener('mouseup', e => {		
 				if(this.dragging) {
+					this.dragging = false
 					this.$emit('input', this.currentPost-1)
 				}
-				
 			})
 		}
 	}