Browse Source

fix(station card): unfavorite $remove not a function fix

Owen Diffey 5 năm trước cách đây
mục cha
commit
533cb86fb3
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      frontend/components/pages/Home.vue

+ 2 - 1
frontend/components/pages/Home.vue

@@ -257,7 +257,8 @@ export default {
 				this.favoriteStations.push(stationId);
 			});
 			this.socket.on("event:user.unfavoritedStation", stationId => {
-				this.favoriteStations.$remove(stationId);
+				const station = this.favoriteStations.indexOf(stationId);
+				this.favoriteStations.splice(station, 1);
 			});
 		});
 	},