Commit aee9bded authored by SpinShare's avatar SpinShare

fixed error on songitem click

parent 0d108ec7
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"description": "SpinSha.re Client", "description": "SpinSha.re Client",
"homepage": "https://spinsha.re", "homepage": "https://spinsha.re",
"copyright": "Copyright © SpinSha.re", "copyright": "Copyright © SpinSha.re",
"version": "2.2.3", "version": "2.2.4",
"author": "SpinSha.re", "author": "SpinSha.re",
"private": true, "private": true,
"scripts": { "scripts": {
......
...@@ -175,12 +175,15 @@ ...@@ -175,12 +175,15 @@
mounted: function() { mounted: function() {
let ssapi = new SSAPI(); let ssapi = new SSAPI();
let userSettings = new UserSettings(); let userSettings = new UserSettings();
let routeID = this.$route.params.id;
ssapi.getSongDetail(this.$route.params.id).then((data) => { ssapi.getSongDetail(routeID).then((data) => {
if(data.status == 200) { if(data.status == 200) {
// transform filereference to id // transform filereference to id
if(this.$route.params.id.includes("spinshare_")) { if(typeof routeID === 'string') {
this.$router.push({ name: 'SongDetailReviews', params: { id: data.data.id } }); if(routeID.includes("spinshare_")) {
this.$router.push({ name: 'SongDetailReviews', params: { id: data.data.id } });
}
} }
this.$data.id = data.data.id; this.$data.id = data.data.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment