Explorar o código

Fix bug where on changing route/category, method would load nextURL of current category rather than new category

sbkwgh %!s(int64=8) %!d(string=hai) anos
pai
achega
0bdc5b30d8
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/components/routes/Index.vue

+ 6 - 1
src/components/routes/Index.vue

@@ -142,10 +142,15 @@
 			getThreads (initial) {
 				if(this.nextURL === null && !initial) return
 
+				let URL = '/api/v1/category/' + this.selectedCategory
+				if(!initial) {
+					URL = this.nextURL || URL
+				}
+
 				this.loading = true
 
 				this.axios
-					.get(this.nextURL || '/api/v1/category/' + this.selectedCategory)
+					.get(URL)
 					.then(res => {
 						this.loading = false